forked from coracle/flotilla
Add android fallback for background push notifications (#102)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import {onMount} from "svelte"
|
||||
import {notificationSettings} from "@app/core/state"
|
||||
import {onNotification} from "@app/util/notifications"
|
||||
import {onNotification} from "@app/util/push"
|
||||
|
||||
let audioElement: HTMLAudioElement
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
} else {
|
||||
const permissions = await Push.request()
|
||||
|
||||
if (permissions === "granted") {
|
||||
if (permissions.startsWith("granted")) {
|
||||
await setSpaceNotifications(url, true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
} else {
|
||||
const permissions = await Push.request()
|
||||
|
||||
if (permissions === "granted") {
|
||||
if (permissions.startsWith("granted")) {
|
||||
await setSpaceNotifications(url, true)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user