Files
Swiftgram/submodules/TelegramCore/Sources/State/AppChangelogState.swift
2021-07-21 21:43:20 +02:00

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