about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/ui/util/async-components.js
diff options
context:
space:
mode:
authorunarist <m.unarist@gmail.com>2017-07-09 00:22:24 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-07-08 17:22:24 +0200
commit46f5d3a2e95a2db7a8197929a7973259ad067a07 (patch)
treed69f124b40bcf9dd5c9aa5802a650e8967d58693 /app/javascript/mastodon/features/ui/util/async-components.js
parent76318f88306656a4a74f190375a78713327bc4e4 (diff)
Fix first loading of notifications when the column is pinned (#4114)
Diffstat (limited to 'app/javascript/mastodon/features/ui/util/async-components.js')
-rw-r--r--app/javascript/mastodon/features/ui/util/async-components.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/javascript/mastodon/features/ui/util/async-components.js b/app/javascript/mastodon/features/ui/util/async-components.js
index c9f81136d..56880dd1f 100644
--- a/app/javascript/mastodon/features/ui/util/async-components.js
+++ b/app/javascript/mastodon/features/ui/util/async-components.js
@@ -1,4 +1,5 @@
 import { store } from '../../../containers/mastodon';
+import { refreshNotifications } from '../../../actions/notifications';
 import { injectAsyncReducer } from '../../../store/configureStore';
 
 // NOTE: When lazy-loading reducers, make sure to add them
@@ -30,6 +31,8 @@ export function Notifications () {
   ]).then(([component, notificationsReducer]) => {
     injectAsyncReducer(store, 'notifications', notificationsReducer.default);
 
+    store.dispatch(refreshNotifications());
+
     return component;
   });
 }