diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2020-01-28 02:20:47 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2020-01-28 19:17:06 +0100 |
commit | ed5fb51168efee6e710a899e53e6928b35fa8a49 (patch) | |
tree | d0cf19ec03481d7f506a18ab08367f36c3fdef3c /app/javascript/flavours/glitch/reducers | |
parent | 44744e3ce14938b4cc826d1d8612aaa7095aa3ef (diff) |
[Glitch] Change announcements to be collapsed on page load in web UI
Port 0fcc4b1c566e4365e07ce5a1c87743db76c07fe6 to glitch-soc Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/reducers')
-rw-r--r-- | app/javascript/flavours/glitch/reducers/announcements.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/reducers/announcements.js b/app/javascript/flavours/glitch/reducers/announcements.js index 3215c1c2d..1653318ce 100644 --- a/app/javascript/flavours/glitch/reducers/announcements.js +++ b/app/javascript/flavours/glitch/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); |