Move notification sound and badge settings to settings store

This commit is contained in:
Matthew Remmel
2025-09-24 13:50:01 -04:00
committed by hodlbod
parent e48d1e0e59
commit c6641dba31
4 changed files with 14 additions and 23 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ import {
getUrlsForEvent,
userRoomsByUrl,
repositoryStore,
showUnreadBadge,
userSettingsValues,
} from "@app/core/state"
import {preferencesStorageProvider} from "@src/lib/storage"
import {Badge} from "@capawesome/capacitor-badge"
@@ -168,7 +168,7 @@ export const badgeCount = derived(notifications, notifications => {
})
export const handleBadgeCountChanges = async (count: number) => {
if (get(showUnreadBadge)) {
if (get(userSettingsValues).show_notifications_badge) {
await Badge.set({count})
} else {
await clearBadges()