v1.5.3 Release

This commit is contained in:
2024-03-10 17:44:29 +02:00
parent 4faa500454
commit a14c62e763
39 changed files with 483 additions and 171 deletions

View File

@ -41,7 +41,7 @@ class UserDefaultsManager {
var DateonmessageMode: Bool {
get {
return boolForKey(Keys.DateonmessageMode, defaultValue: true)
return boolForKey(Keys.DateonmessageMode, defaultValue: false)
}
set {
setBool(newValue, forKey: Keys.DateonmessageMode)
@ -74,8 +74,7 @@ class UserDefaultsManager {
var autodownloadImages: AutodownloadImages {
get {
let defaultValue = AutodownloadImages.Never //Easy enough to reach option for users. Reverting change since there is an extremely high risk of people getting in trouble since an attacked can get you in prison by sending you cp.
let defaultValue = AutodownloadImages.Never
guard let string = stringForKey(Keys.AutodownloadImages) else {
return defaultValue
}
@ -85,6 +84,26 @@ class UserDefaultsManager {
setObject(newValue.rawValue as AnyObject?, forKey: Keys.AutodownloadImages)
}
}
enum AppTheme: String {
case themeAutomatic
case themeLight
case themeDark
}
var appTheme: AppTheme {
get {
let defaultValue = AppTheme.themeAutomatic
guard let string = stringForKey(Keys.AppTheme) else {
return defaultValue
}
return AppTheme(rawValue: string) ?? defaultValue
}
set {
setObject(newValue.rawValue as AnyObject?, forKey: Keys.AppTheme)
}
}
func resetUDPEnabled() {
removeObjectForKey(Keys.UDPEnabled)
@ -101,6 +120,7 @@ private extension UserDefaultsManager {
static let ShowNotificationsPreview = "user-info/snow-notification-preview"
static let LongerbgMode = "user-info/longerbg-mode"
static let AutodownloadImages = "user-info/autodownload-images"
static let AppTheme = "user-info/app-theme"
}
func setObject(_ object: AnyObject?, forKey key: String) {