|
|
@ -18,6 +18,7 @@ import {
|
|
|
|
importFetchedStatuses,
|
|
|
|
importFetchedStatuses,
|
|
|
|
} from './importer';
|
|
|
|
} from './importer';
|
|
|
|
import { submitMarkers } from './markers';
|
|
|
|
import { submitMarkers } from './markers';
|
|
|
|
|
|
|
|
import { register as registerPushNotifications } from './push_notifications';
|
|
|
|
import { saveSettings } from './settings';
|
|
|
|
import { saveSettings } from './settings';
|
|
|
|
|
|
|
|
|
|
|
|
export const NOTIFICATIONS_UPDATE = 'NOTIFICATIONS_UPDATE';
|
|
|
|
export const NOTIFICATIONS_UPDATE = 'NOTIFICATIONS_UPDATE';
|
|
|
@ -293,6 +294,10 @@ export function requestBrowserPermission(callback = noOp) {
|
|
|
|
requestNotificationPermission((permission) => {
|
|
|
|
requestNotificationPermission((permission) => {
|
|
|
|
dispatch(setBrowserPermission(permission));
|
|
|
|
dispatch(setBrowserPermission(permission));
|
|
|
|
callback(permission);
|
|
|
|
callback(permission);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (permission === 'granted') {
|
|
|
|
|
|
|
|
dispatch(registerPushNotifications());
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|