about summary refs log tree commit diff
path: root/app/javascript/mastodon/reducers/announcements.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-01-28 02:20:47 +0100
committerGitHub <noreply@github.com>2020-01-28 02:20:47 +0100
commit0fcc4b1c566e4365e07ce5a1c87743db76c07fe6 (patch)
tree5ebde458b2df0dfbed0d63178cd1997ef592aa8b /app/javascript/mastodon/reducers/announcements.js
parentc2dfd5e4e24a70fbfa02678fde4cfc6f6750deb4 (diff)
Change announcements to be collapsed on page load in web UI (#12990)
Diffstat (limited to 'app/javascript/mastodon/reducers/announcements.js')
-rw-r--r--app/javascript/mastodon/reducers/announcements.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/javascript/mastodon/reducers/announcements.js b/app/javascript/mastodon/reducers/announcements.js
index 3215c1c2d..1653318ce 100644
--- a/app/javascript/mastodon/reducers/announcements.js
+++ b/app/javascript/mastodon/reducers/announcements.js
@@ -16,7 +16,7 @@ import { Map as ImmutableMap, List as ImmutableList, Set as ImmutableSet, fromJS
 const initialState = ImmutableMap({
   items: ImmutableList(),
   isLoading: false,
-  show: true,
+  show: false,
   unread: ImmutableSet(),
 });
 
@@ -84,10 +84,11 @@ export default function announcementsReducer(state = initialState, action) {
       const items = fromJS(action.announcements);
 
       map.set('unread', ImmutableSet());
-      map.set('items', items);
-      map.set('isLoading', false);
 
       addUnread(map, items);
+
+      map.set('items', items);
+      map.set('isLoading', false);
     });
   case ANNOUNCEMENTS_FETCH_FAIL:
     return state.set('isLoading', false);