|
|
@ -67,8 +67,8 @@ const mapStateToProps = state => ({ |
|
|
|
hasMore: state.getIn(['notifications', 'hasMore']), |
|
|
|
hasMore: state.getIn(['notifications', 'hasMore']), |
|
|
|
numPending: state.getIn(['notifications', 'pendingItems'], ImmutableList()).size, |
|
|
|
numPending: state.getIn(['notifications', 'pendingItems'], ImmutableList()).size, |
|
|
|
notifCleaningActive: state.getIn(['notifications', 'cleaningMode']), |
|
|
|
notifCleaningActive: state.getIn(['notifications', 'cleaningMode']), |
|
|
|
lastReadId: state.getIn(['local_settings', 'notifications', 'show_unread']) ? state.getIn(['notifications', 'readMarkerId']) : '0', |
|
|
|
lastReadId: state.getIn(['settings', 'notifications', 'showUnread']) ? 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), |
|
|
|
canMarkAsRead: state.getIn(['settings', 'notifications', 'showUnread']) && 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' && !state.getIn(['settings', 'notifications', 'dismissPermissionBanner']), |
|
|
|
needsNotificationPermission: state.getIn(['settings', 'notifications', 'alerts']).includes(true) && state.getIn(['notifications', 'browserSupport']) && state.getIn(['notifications', 'browserPermission']) === 'default' && !state.getIn(['settings', 'notifications', 'dismissPermissionBanner']), |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|