Topic improvements

This commit is contained in:
Ali
2022-11-09 17:28:59 +04:00
parent bc99f54b63
commit 3f80dd8ef9
14 changed files with 304 additions and 104 deletions

View File

@@ -1862,6 +1862,19 @@ final class ChatListSearchListPaneNode: ASDisplayNode, ChatListSearchPaneNode {
}
}, present: { c in
interaction.present(c, nil)
}, openForumThread: { [weak self] peerId, threadId in
guard let self else {
return
}
let _ = (self.context.engine.data.get(TelegramEngine.EngineData.Item.Peer.Peer(id: peerId))
|> deliverOnMainQueue).start(next: { [weak self] peer in
guard let self, let peer else {
return
}
interaction.dismissInput()
interaction.openPeer(peer, peer, threadId, false)
self.listNode.clearHighlightAnimated(true)
})
})
let listInteraction = ListMessageItemInteraction(openMessage: { [weak self] message, mode -> Bool in
@@ -3056,7 +3069,7 @@ private final class ChatListSearchShimmerNode: ASDisplayNode {
let interaction = ChatListNodeInteraction(context: context, animationCache: animationCache, animationRenderer: animationRenderer, activateSearch: {}, peerSelected: { _, _, _, _ in }, disabledPeerSelected: { _, _ in }, togglePeerSelected: { _, _ in }, togglePeersSelection: { _, _ in }, additionalCategorySelected: { _ in
}, messageSelected: { _, _, _, _ in}, groupSelected: { _ in }, addContact: { _ in }, setPeerIdWithRevealedOptions: { _, _ in }, setItemPinned: { _, _ in }, setPeerMuted: { _, _ in }, setPeerThreadMuted: { _, _, _ in }, deletePeer: { _, _ in }, deletePeerThread: { _, _ in }, setPeerThreadStopped: { _, _, _ in }, setPeerThreadPinned: { _, _, _ in }, updatePeerGrouping: { _, _ in }, togglePeerMarkedUnread: { _, _ in}, toggleArchivedFolderHiddenByDefault: {}, toggleThreadsSelection: { _, _ in }, hidePsa: { _ in }, activateChatPreview: { _, _, gesture, _ in
gesture?.cancel()
}, present: { _ in })
}, present: { _ in }, openForumThread: { _, _ in })
let items = (0 ..< 2).compactMap { _ -> ListViewItem? in
switch key {