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
+4 -12
View File
@@ -338,6 +338,8 @@ export type SettingsValues = {
report_errors: boolean
send_delay: number
font_size: number
play_notification_sound: boolean
show_notifications_badge: boolean
}
export type Settings = {
@@ -353,6 +355,8 @@ export const defaultSettings = {
report_errors: true,
send_delay: 0,
font_size: 1,
play_notification_sound: true,
show_notifications_badge: true,
}
export const settings = deriveEventsMapped<Settings>(repository, {
@@ -425,18 +429,6 @@ export const dmAlert = derived(alerts, $alerts =>
}),
)
export const showUnreadBadge = synced({
key: "showUnreadBadge",
defaultValue: true,
storage: preferencesStorageProvider,
})
export const playAlertSound = synced({
key: "playAlertSound",
defaultValue: true,
storage: preferencesStorageProvider,
})
// Alert Statuses
export type AlertStatus = {