|
|
|
|
@ -8,6 +8,7 @@ |
|
|
|
|
import Foundation |
|
|
|
|
|
|
|
|
|
enum PreferenceKey: String { |
|
|
|
|
case installDate |
|
|
|
|
case countdowns |
|
|
|
|
case stopwatches |
|
|
|
|
case playConfirmationSound |
|
|
|
|
@ -32,6 +33,7 @@ class Preferences { |
|
|
|
|
@UserDefault(PreferenceKey.playCancellationSound.rawValue, defaultValue: true) static var playCancellationSound: Bool |
|
|
|
|
@UserDefault(PreferenceKey.cloudKitSchemaInitialized.rawValue, defaultValue: false) static var cloudKitSchemaInitialized: Bool |
|
|
|
|
@UserDefault(PreferenceKey.defaultVolume.rawValue, defaultValue: 0.5) static var defaultVolume: Float |
|
|
|
|
@UserDefault(PreferenceKey.installDate.rawValue, defaultValue: nil) static var installDate: Date? |
|
|
|
|
|
|
|
|
|
static var hideSilentModeAlerts: Bool { |
|
|
|
|
return UserDefaults.standard.bool(forKey: PreferenceKey.showSilentModeAlert.rawValue) |
|
|
|
|
|