Define the notification sound name in AppSettings. (#5106)

This commit is contained in:
Doug
2026-02-13 16:36:45 +00:00
committed by GitHub
parent 4ec2516d55
commit 46be78bc75
6 changed files with 10 additions and 3 deletions

View File

@@ -16,6 +16,7 @@ import SwiftUI
/// Common settings between app and NSE
protocol CommonSettingsProtocol: AnyObject {
var lastNotificationBootTime: TimeInterval? { get set }
var notificationSoundName: RemotePreference<UNNotificationSoundName> { get }
var logLevel: LogLevel { get }
var traceLogPacks: Set<TraceLogPack> { get }
@@ -298,6 +299,9 @@ final class AppSettings {
@UserPreference(key: UserDefaultsKeys.lastNotificationBootTime, storageType: .userDefaults(store))
var lastNotificationBootTime: TimeInterval?
/// The name of sound played when delivering noisy notifications.
var notificationSoundName: RemotePreference<UNNotificationSoundName> = .init(.init("message.caf"))
// MARK: - Logging
@UserPreference(key: UserDefaultsKeys.logLevel, defaultValue: LogLevel.info, storageType: .userDefaults(store))