Merge branch 'master' into postbox-refactoring-1

This commit is contained in:
Ali
2021-09-03 12:49:58 +04:00
224 changed files with 2988 additions and 2385 deletions

View File

@@ -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)
}
})