Removed the ability to enable notifications when they are not supported.
Safari for iOS was very cool and would get stuck on the loading screen if you did turn them on!
This commit is contained in:
parent
55f3fd87fc
commit
efd3cae2ab
1 changed files with 5 additions and 6 deletions
|
@ -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: '',
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue