diff --git a/src/mami.js/settings.js b/src/mami.js/settings.js index 0138601..1daeb42 100644 --- a/src/mami.js/settings.js +++ b/src/mami.js/settings.js @@ -361,12 +361,11 @@ const UmiSettings = { name: 'Show notifications', category: 'notification', type: 'checkbox', - mutable: true, + mutable: (() => 'Notification' in window)(), default: false, watcher: function(v, n, i) { - if(!v) return; - - if(Notification.permission === 'granted' && Notification.permission !== 'denied') + if(!v || !('Notification' in window) + || (Notification.permission === 'granted' && Notification.permission !== 'denied')) return; Notification.requestPermission() @@ -381,7 +380,7 @@ const UmiSettings = { name: 'Show contents of message', category: 'notification', type: 'checkbox', - mutable: true, + mutable: (() => 'Notification' in window)(), default: false, }, { @@ -389,7 +388,7 @@ const UmiSettings = { name: 'Triggers', category: 'notification', type: 'text', - mutable: true, + mutable: (() => 'Notification' in window)(), default: '', }, {