about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/notifications/index.js
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-12-15 18:43:54 +0100
committerClaire <claire.github-309c@sitedethib.com>2020-12-19 01:02:32 +0100
commite0a253fb2245e538f1854090eb0b72416a21b5bf (patch)
tree58d518ee26c6a919e15811d80a2df8e55a621715 /app/javascript/flavours/glitch/features/notifications/index.js
parentf9d000ebaec7732d5fcd46aa6685108a2619966b (diff)
[Glitch] Change notification permission handling
Port 79efcf8aad17b8bc47d98592151fbd24b977cbeb to glitch-soc

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/notifications/index.js')
-rw-r--r--app/javascript/flavours/glitch/features/notifications/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/notifications/index.js b/app/javascript/flavours/glitch/features/notifications/index.js
index 73d969517..5ceda9a91 100644
--- a/app/javascript/flavours/glitch/features/notifications/index.js
+++ b/app/javascript/flavours/glitch/features/notifications/index.js
@@ -69,7 +69,7 @@ const mapStateToProps = state => ({
   notifCleaningActive: state.getIn(['notifications', 'cleaningMode']),
   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',
+  needsNotificationPermission: state.getIn(['settings', 'notifications', 'alerts']).includes(true) && state.getIn(['notifications', 'browserSupport']) && state.getIn(['notifications', 'browserPermission']) === 'default' && !state.getIn(['settings', 'notifications', 'dismissPermissionBanner']),
 });
 
 /* glitch */