Refactoring

This commit is contained in:
Ali
2021-08-03 12:23:13 +02:00
parent 1a0dc56953
commit 7e6eb2b3bd
46 changed files with 702 additions and 470 deletions

View File

@@ -41,13 +41,7 @@ func _internal_clearCloudDraftsInteractively(postbox: Postbox, network: Network,
updatePeerPresences(transaction: transaction, accountPeerId: accountPeerId, peerPresences: peerPresences)
var signals: [Signal<Void, NoError>] = []
for peerId in peerIds {
transaction.updatePeerChatInterfaceState(peerId, update: { current in
if let current = current as? SynchronizeableChatInterfaceState {
return current.withUpdatedSynchronizeableInputState(nil)
} else {
return nil
}
})
_internal_updateChatInputState(transaction: transaction, peerId: peerId, inputState: nil)
if let peer = transaction.getPeer(peerId), let inputPeer = apiInputPeer(peer) {
signals.append(network.request(Api.functions.messages.saveDraft(flags: 0, replyToMsgId: nil, peer: inputPeer, message: "", entities: nil))