Rename TelegramCore source folder

This commit is contained in:
Peter
2019-10-29 00:13:20 +04:00
parent d1e57a24bb
commit d2e57174a7
341 changed files with 9 additions and 69 deletions

View File

@@ -0,0 +1,26 @@
import Foundation
#if os(macOS)
import PostboxMac
import SwiftSignalKitMac
#else
import Postbox
import SwiftSignalKit
#endif
import SyncCore
public func updatePeerChatInterfaceState(account: Account, peerId: PeerId, state: SynchronizeableChatInterfaceState) -> Signal<Void, NoError> {
return account.postbox.transaction { transaction -> Void in
let currentInputState = (transaction.getPeerChatInterfaceState(peerId) as? SynchronizeableChatInterfaceState)?.synchronizeableInputState
let updatedInputState = state.synchronizeableInputState
if currentInputState != updatedInputState {
if peerId.namespace == Namespaces.Peer.CloudUser || peerId.namespace == Namespaces.Peer.CloudChannel || peerId.namespace == Namespaces.Peer.CloudGroup {
addSynchronizeChatInputStateOperation(transaction: transaction, peerId: peerId)
}
}
transaction.updatePeerChatInterfaceState(peerId, update: { _ in
return state
})
}
}