From 0aeb833317de7ad8962ebde113836585cfe6b33d Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 11 Nov 2020 05:36:29 +0100 Subject: [Glitch] Add button to dismiss desktop notifications permissions banner Port 4790a126bebddd83cbaf1a8436611536dcc417a0 to glitch-soc Signed-off-by: Thibaut Girka --- app/javascript/flavours/glitch/reducers/notifications.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/javascript/flavours/glitch/reducers') diff --git a/app/javascript/flavours/glitch/reducers/notifications.js b/app/javascript/flavours/glitch/reducers/notifications.js index b4c5ef71a..c630cc7e3 100644 --- a/app/javascript/flavours/glitch/reducers/notifications.js +++ b/app/javascript/flavours/glitch/reducers/notifications.js @@ -19,6 +19,7 @@ import { NOTIFICATIONS_MARK_AS_READ, NOTIFICATIONS_SET_BROWSER_SUPPORT, NOTIFICATIONS_SET_BROWSER_PERMISSION, + NOTIFICATIONS_DISMISS_BROWSER_PERMISSION, } from 'flavours/glitch/actions/notifications'; import { ACCOUNT_BLOCK_SUCCESS, @@ -283,6 +284,8 @@ export default function notifications(state = initialState, action) { return state.set('browserSupport', action.value); case NOTIFICATIONS_SET_BROWSER_PERMISSION: return state.set('browserPermission', action.value); + case NOTIFICATIONS_DISMISS_BROWSER_PERMISSION: + return state.set('browserPermission', 'denied'); case NOTIFICATION_MARK_FOR_DELETE: return markForDelete(state, action.id, action.yes); -- cgit