mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Refactoring
This commit is contained in:
@@ -6,6 +6,6 @@ import MtProtoKit
|
||||
|
||||
func updateAppChangelogState(transaction: Transaction, _ f: @escaping (AppChangelogState) -> AppChangelogState) {
|
||||
transaction.updatePreferencesEntry(key: PreferencesKeys.appChangelogState, { current in
|
||||
return PreferencesEntry(f((current as? AppChangelogState) ?? AppChangelogState.default))
|
||||
return PreferencesEntry(f((current?.get(AppChangelogState.self)) ?? AppChangelogState.default))
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user