Fix browser notification permission request logic (#13543)
* Add notification permission handling code * Request notification permission when enabling any notification setting * Add badge to notification settings when permissions insufficient * Disable alerts by default, requesting permission and enable them on onboarding
This commit is contained in:
parent
5e1364c448
commit
f54ca3d08e
14 changed files with 215 additions and 15 deletions
|
@ -3,6 +3,7 @@ import IconWithBadge from 'mastodon/components/icon_with_badge';
|
|||
|
||||
const mapStateToProps = state => ({
|
||||
count: state.getIn(['notifications', 'unread']),
|
||||
issueBadge: state.getIn(['settings', 'notifications', 'alerts']).includes(true) && state.getIn(['notifications', 'browserSupport']) && state.getIn(['notifications', 'browserPermission']) !== 'granted',
|
||||
id: 'bell',
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue