We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 423cbdf commit b144ae2Copy full SHA for b144ae2
src/app/core/services/user-notification.service.ts
@@ -28,12 +28,18 @@ export class UserNotificationService {
28
this.notificationData.pipe(
29
tap(val => {
30
if (this.hasNotificationSupport && this.hasGrantedNotificationSupport) {
31
- new Notification('RiverSurf', {
32
- body: val.content,
33
- tag: val.surfEventName,
34
- icon: '/assets/icons/icon-512x512.png',
35
- vibrate: 400
36
- });
+ try {
+ const notification = new Notification('RiverSurf', {
+ body: val.content,
+ tag: val.surfEventName,
+ icon: '/assets/icons/icon-256x256.png',
+ vibrate: 400
37
+ });
38
+ } catch {
39
+ if (this.hasVibrationSupport) {
40
+ window.navigator.vibrate(400);
41
+ }
42
43
} else {
44
if (this.hasVibrationSupport) {
45
window.navigator.vibrate(400);
0 commit comments