Update notification subscriptions reactively

This commit is contained in:
Jon Staab
2026-01-26 11:12:15 -08:00
parent 9b3a8258ce
commit 143a1dd39b
6 changed files with 271 additions and 173 deletions
+12 -13
View File
@@ -338,19 +338,7 @@ export const relaysMostlyRestricted = writable<Record<string, string>>({})
// Push notifications
export const notificationSettings = withGetter(
writable<{
push: boolean
sound: boolean
badge: boolean
spaces: boolean
mentions: boolean
messages: boolean
token?: string
subscription?: {
key: string
callback: string
}
}>({
writable({
push: false,
sound: false,
badge: false,
@@ -360,6 +348,17 @@ export const notificationSettings = withGetter(
}),
)
export const notificationState = withGetter(
writable<{
token?: string
subscription?: {
key: string
callback: string
}
}>({}),
)
// Chats
export type Chat = {