diff options
author | ThibG <thib@sitedethib.com> | 2020-02-03 01:53:09 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2020-02-03 09:31:32 +0100 |
commit | 3dcb279da31bc7810b7f58991dad4f886aaade34 (patch) | |
tree | 66a2d3ef757eb5f7ed7b57a7dc215e77c0a18e97 /app/javascript/flavours/glitch/features/home_timeline/index.js | |
parent | dd6149ca0b05b05bd9103e2127adc387edb7fd22 (diff) |
[Glitch] Change how unread announcements are handled
Port 3adc722d1cdd28d87d2724b8952d7ec52d241b52 to glitch-soc Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/home_timeline/index.js')
-rw-r--r-- | app/javascript/flavours/glitch/features/home_timeline/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/home_timeline/index.js b/app/javascript/flavours/glitch/features/home_timeline/index.js index 5e36e5f76..cc8e4664c 100644 --- a/app/javascript/flavours/glitch/features/home_timeline/index.js +++ b/app/javascript/flavours/glitch/features/home_timeline/index.js @@ -24,7 +24,7 @@ const mapStateToProps = state => ({ hasUnread: state.getIn(['timelines', 'home', 'unread']) > 0, isPartial: state.getIn(['timelines', 'home', 'isPartial']), hasAnnouncements: !state.getIn(['announcements', 'items']).isEmpty(), - unreadAnnouncements: state.getIn(['announcements', 'unread']).size, + unreadAnnouncements: state.getIn(['announcements', 'items']).count(item => !item.get('read')), showAnnouncements: state.getIn(['announcements', 'show']), }); |