Add android fallback for background push notifications (#102)

This commit is contained in:
2026-03-19 15:32:32 +00:00
parent 7e2a0e9d5f
commit 0761cdd28f
17 changed files with 1642 additions and 515 deletions
+6 -4
View File
@@ -24,17 +24,19 @@
clearBadges()
}
if (settings.push) {
const permissions = await Push.request()
let permission = "granted"
if (permissions !== "granted") {
if (settings.push) {
permission = await Push.request()
if (!permission.startsWith("granted")) {
await sleep(300)
settings.push = false
return pushToast({
theme: "error",
message: `Failed to request notification permissions (${permissions}).`,
message: `Failed to request notification permissions (${permission}).`,
})
}
}