src/utils/util.js
/**
     * Requests Notification Permissions
     * Handles check and error cases
     */
Requests Notification Permissions
Handles check and error cases
Requests Notification Permissions Handles check and error cases
static requestNotifications () {
        if (!store.state.notifications || !Notifications.needsPermission()) {
            return;
        }
        Notifications.requestPermission().then(() => {
        }).catch(() => {
            const settingsRedirect = () => router.push('settings').catch(() => {});
            store.commit('notifications', false);
            Util.snackbar({
                message: "Noticiations have been disabled",
                actionHandler: settingsRedirect,
                actionText: 'Settings'
            });
        });
    }
static requestNotifications ( ) { if ( ! store . state . notifications || ! Notifications . needsPermission ( ) ) { return ; } Notifications . requestPermission ( ) . then ( ( ) => { } ) . catch ( ( ) => { const settingsRedirect = ( ) => router . push ( 'settings' ) . catch ( ( ) => { } ) ; store . commit ( 'notifications' , false ) ; Util . snackbar ( { message : "Noticiations have been disabled" , actionHandler : settingsRedirect , actionText : 'Settings' } ) ; } ) ; }
Requests Notification Permissions
 Handles check and error cases
Requests Notification Permissions Handles check and error cases
// Determine if notification request is necessary // This promise may not ever fire because the notificatino api is bad // Noop // If denied, set setting to false and alert // Handle redirect to settings page