Cleanup
This commit is contained in:
@ -2,18 +2,18 @@ import { AnimeNotifier } from "../AnimeNotifier"
|
||||
|
||||
// Enable notifications
|
||||
export async function enableNotifications(arn: AnimeNotifier, button: HTMLElement) {
|
||||
arn.statusMessage.showInfo("Enabling push notifications...")
|
||||
arn.statusMessage.showInfo("Enabling instant notifications...")
|
||||
await arn.pushManager.subscribe(arn.user.dataset.id)
|
||||
arn.updatePushUI()
|
||||
arn.statusMessage.showInfo("Enabled push notifications for this device.")
|
||||
arn.statusMessage.showInfo("Enabled instant notifications for this device.")
|
||||
}
|
||||
|
||||
// Disable notifications
|
||||
export async function disableNotifications(arn: AnimeNotifier, button: HTMLElement) {
|
||||
arn.statusMessage.showInfo("Disabling push notifications...")
|
||||
arn.statusMessage.showInfo("Disabling instant notifications...")
|
||||
await arn.pushManager.unsubscribe(arn.user.dataset.id)
|
||||
arn.updatePushUI()
|
||||
arn.statusMessage.showInfo("Disabled push notifications for this device.")
|
||||
arn.statusMessage.showInfo("Disabled instant notifications for this device.")
|
||||
}
|
||||
|
||||
// Test notification
|
||||
|
Reference in New Issue
Block a user