Swiftgram/submodules/TelegramCore/Sources/State/AppChangelogState.swift

12 lines
369 B
Swift

import Foundation
import Postbox
import SwiftSignalKit
import MtProtoKit
func updateAppChangelogState(transaction: Transaction, _ f: @escaping (AppChangelogState) -> AppChangelogState) {
transaction.updatePreferencesEntry(key: PreferencesKeys.appChangelogState, { current in
return f((current as? AppChangelogState) ?? AppChangelogState.default)
})
}