no message

This commit is contained in:
Peter
2017-01-17 18:33:36 +03:00
parent 84c0a86d8f
commit 9835ac1b88
17 changed files with 743 additions and 33 deletions

View File

@@ -12,6 +12,7 @@ final class PostboxTransaction {
let currentUpdatedPeerChatListEmbeddedStates: [PeerId: PeerChatListEmbeddedInterfaceState?]
let currentUpdatedTotalUnreadCount: Int32?
let peerIdsWithUpdatedUnreadCounts: Set<PeerId>
let currentPeerMergedOperationLogOperations: [PeerMergedOperationLogOperation]
let unsentMessageOperations: [IntermediateMessageHistoryUnsentOperation]
let updatedSynchronizePeerReadStateOperations: [PeerId: PeerReadStateSynchronizationOperation?]
@@ -68,10 +69,13 @@ final class PostboxTransaction {
if !peerIdsWithUpdatedUnreadCounts.isEmpty {
return false
}
if !currentPeerMergedOperationLogOperations.isEmpty {
return false
}
return true
}
init(currentOperationsByPeerId: [PeerId: [MessageHistoryOperation]], peerIdsWithFilledHoles: [PeerId: [MessageIndex: HoleFillDirection]], removedHolesByPeerId: [PeerId: [MessageIndex: HoleFillDirection]], chatListOperations: [ChatListOperation], currentUpdatedPeers: [PeerId: Peer], currentUpdatedPeerNotificationSettings: [PeerId: PeerNotificationSettings], currentUpdatedCachedPeerData: [PeerId: CachedPeerData], currentUpdatedPeerPresences: [PeerId: PeerPresence], currentUpdatedPeerChatListEmbeddedStates: [PeerId: PeerChatListEmbeddedInterfaceState?], currentUpdatedTotalUnreadCount: Int32?, peerIdsWithUpdatedUnreadCounts: Set<PeerId>, unsentMessageOperations: [IntermediateMessageHistoryUnsentOperation], updatedSynchronizePeerReadStateOperations: [PeerId: PeerReadStateSynchronizationOperation?], updatedMedia: [MediaId: Media?], replaceContactPeerIds: Set<PeerId>?, currentUpdatedMasterClientId: Int64?) {
init(currentOperationsByPeerId: [PeerId: [MessageHistoryOperation]], peerIdsWithFilledHoles: [PeerId: [MessageIndex: HoleFillDirection]], removedHolesByPeerId: [PeerId: [MessageIndex: HoleFillDirection]], chatListOperations: [ChatListOperation], currentUpdatedPeers: [PeerId: Peer], currentUpdatedPeerNotificationSettings: [PeerId: PeerNotificationSettings], currentUpdatedCachedPeerData: [PeerId: CachedPeerData], currentUpdatedPeerPresences: [PeerId: PeerPresence], currentUpdatedPeerChatListEmbeddedStates: [PeerId: PeerChatListEmbeddedInterfaceState?], currentUpdatedTotalUnreadCount: Int32?, peerIdsWithUpdatedUnreadCounts: Set<PeerId>, currentPeerMergedOperationLogOperations: [PeerMergedOperationLogOperation], unsentMessageOperations: [IntermediateMessageHistoryUnsentOperation], updatedSynchronizePeerReadStateOperations: [PeerId: PeerReadStateSynchronizationOperation?], updatedMedia: [MediaId: Media?], replaceContactPeerIds: Set<PeerId>?, currentUpdatedMasterClientId: Int64?) {
self.currentOperationsByPeerId = currentOperationsByPeerId
self.peerIdsWithFilledHoles = peerIdsWithFilledHoles
self.removedHolesByPeerId = removedHolesByPeerId
@@ -83,6 +87,7 @@ final class PostboxTransaction {
self.currentUpdatedPeerChatListEmbeddedStates = currentUpdatedPeerChatListEmbeddedStates
self.currentUpdatedTotalUnreadCount = currentUpdatedTotalUnreadCount
self.peerIdsWithUpdatedUnreadCounts = peerIdsWithUpdatedUnreadCounts
self.currentPeerMergedOperationLogOperations = currentPeerMergedOperationLogOperations
self.unsentMessageOperations = unsentMessageOperations
self.updatedSynchronizePeerReadStateOperations = updatedSynchronizePeerReadStateOperations
self.updatedMedia = updatedMedia