mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Merge branch 'master' into postbox-refactoring-1
This commit is contained in:
@@ -7,12 +7,12 @@ public func updateLoggingSettings(accountManager: AccountManager<TelegramAccount
|
||||
return accountManager.transaction { transaction -> Void in
|
||||
var updated: LoggingSettings?
|
||||
transaction.updateSharedData(SharedDataKeys.loggingSettings, { current in
|
||||
if let current = current as? LoggingSettings {
|
||||
if let current = current?.get(LoggingSettings.self) {
|
||||
updated = f(current)
|
||||
return updated
|
||||
return PreferencesEntry(updated)
|
||||
} else {
|
||||
updated = f(LoggingSettings.defaultSettings)
|
||||
return updated
|
||||
return PreferencesEntry(updated)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user