Move notification sound and badge settings to settings store
This commit is contained in:
+4
-12
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user