diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-10-27 10:52:50 +0100 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2020-10-27 11:20:11 +0100 |
commit | a81bb14abef08bb434caa0df8f15fcd8ecc85e41 (patch) | |
tree | 8bac9b021ff943e938a73a4acf0f48ef02e6e4c3 /app/javascript/flavours/glitch/features/notifications | |
parent | c762ca49dc924ce32b512c2aece4d7d1e0229b5c (diff) |
Add option to hide notification markers
Diffstat (limited to 'app/javascript/flavours/glitch/features/notifications')
-rw-r--r-- | app/javascript/flavours/glitch/features/notifications/index.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/notifications/index.js b/app/javascript/flavours/glitch/features/notifications/index.js index af928594d..97434b586 100644 --- a/app/javascript/flavours/glitch/features/notifications/index.js +++ b/app/javascript/flavours/glitch/features/notifications/index.js @@ -61,8 +61,8 @@ const mapStateToProps = state => ({ hasMore: state.getIn(['notifications', 'hasMore']), numPending: state.getIn(['notifications', 'pendingItems'], ImmutableList()).size, notifCleaningActive: state.getIn(['notifications', 'cleaningMode']), - lastReadId: state.getIn(['notifications', 'readMarkerId']), - canMarkAsRead: state.getIn(['notifications', 'readMarkerId']) !== '0' && getNotifications(state).some(item => item !== null && compareId(item.get('id'), state.getIn(['notifications', 'readMarkerId'])) > 0), + lastReadId: state.getIn(['local_settings', 'notifications', 'show_unread']) ? state.getIn(['notifications', 'readMarkerId']) : '0', + canMarkAsRead: state.getIn(['local_settings', 'notifications', 'show_unread']) && state.getIn(['notifications', 'readMarkerId']) !== '0' && getNotifications(state).some(item => item !== null && compareId(item.get('id'), state.getIn(['notifications', 'readMarkerId'])) > 0), needsNotificationPermission: state.getIn(['settings', 'notifications', 'alerts']).includes(true) && state.getIn(['notifications', 'browserSupport']) && state.getIn(['notifications', 'browserPermission']) === 'default', }); |