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:
@@ -23,10 +23,10 @@ extension ProxyServerSettings {
|
||||
public func updateProxySettingsInteractively(transaction: AccountManagerModifier<TelegramAccountManagerTypes>, _ f: @escaping (ProxySettings) -> ProxySettings) -> Bool {
|
||||
var hasChanges = false
|
||||
transaction.updateSharedData(SharedDataKeys.proxySettings, { current in
|
||||
let previous = (current as? ProxySettings) ?? ProxySettings.defaultSettings
|
||||
let previous = current?.get(ProxySettings.self) ?? ProxySettings.defaultSettings
|
||||
let updated = f(previous)
|
||||
hasChanges = previous != updated
|
||||
return updated
|
||||
return PreferencesEntry(updated)
|
||||
})
|
||||
return hasChanges
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user