mirror of
https://github.com/ichmagmaus111/ghostgram.git
synced 2026-11-03 06:14:14 +01:00
Ghostgram for iOS, rebuilt from scratch on Telegram iOS 13.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
13 lines
577 B
Swift
13 lines
577 B
Swift
import Foundation
|
|
import Postbox
|
|
import SwiftSignalKit
|
|
|
|
public func updateNetworkEngineSettings(accountManager: AccountManager<TelegramAccountManagerTypes>, _ f: @escaping (NetworkEngineSettings) -> NetworkEngineSettings) -> Signal<Void, NoError> {
|
|
return accountManager.transaction { transaction -> Void in
|
|
transaction.updateSharedData(SharedDataKeys.networkEngineSettings, { current in
|
|
let previous = current?.get(NetworkEngineSettings.self) ?? NetworkEngineSettings.defaultSettings
|
|
return PreferencesEntry(f(previous))
|
|
})
|
|
}
|
|
}
|