Implement chat stack display

This commit is contained in:
Ali
2022-01-18 20:29:18 +04:00
parent c46f91eb20
commit 4adb3879d9
7 changed files with 81 additions and 12 deletions

View File

@@ -540,7 +540,17 @@ final class ChatListContainerNode: ASDisplayNode, UIGestureRecognizerDelegate {
})
if self.controlsHistoryPreload {
self.context.account.viewTracker.chatListPreloadItems.set(itemNode.listNode.preloadItems.get())
self.context.account.viewTracker.chatListPreloadItems.set(combineLatest(queue: .mainQueue(),
context.sharedContext.hasOngoingCall.get(),
itemNode.listNode.preloadItems.get()
)
|> map { hasOngoingCall, preloadItems -> [ChatHistoryPreloadItem] in
if hasOngoingCall {
return []
} else {
return preloadItems
}
})
}
}