distinctUntilChanged for preloadManager [skip ci]

This commit is contained in:
overtake 2020-03-14 21:42:16 +04:00
parent 8bb7699a65
commit 015d3de3a5
2 changed files with 2 additions and 2 deletions

View File

@ -286,7 +286,7 @@ public final class AccountViewTracker {
self.historyViewStateValidationContexts = HistoryViewStateValidationContexts(queue: self.queue, postbox: account.postbox, network: account.network, accountPeerId: account.peerId)
self.chatHistoryPreloadManager = ChatHistoryPreloadManager(postbox: account.postbox, network: account.network, accountPeerId: account.peerId, networkState: account.networkState, preloadItemsSignal: self.chatListPreloadItems.get())
self.chatHistoryPreloadManager = ChatHistoryPreloadManager(postbox: account.postbox, network: account.network, accountPeerId: account.peerId, networkState: account.networkState, preloadItemsSignal: self.chatListPreloadItems.get() |> distinctUntilChanged)
self.externallyUpdatedPeerIdDisposable.set((account.stateManager.externallyUpdatedPeerIds
|> deliverOn(self.queue)).start(next: { [weak self] peerIds in

View File

@ -234,7 +234,7 @@ private final class AdditionalPreloadPeerIdsContext {
}
}
public struct ChatHistoryPreloadItem {
public struct ChatHistoryPreloadItem : Equatable {
public let index: ChatListIndex
public let isMuted: Bool
public let hasUnread: Bool