Hashtag search improvements

This commit is contained in:
Ilya Laktyushin
2024-05-22 14:04:37 +04:00
parent 7c7456de4b
commit 464eb8625f
53 changed files with 2049 additions and 469 deletions

View File

@@ -52,7 +52,12 @@ func inputPanelForChatPresentationIntefaceState(_ chatPresentationInterfaceState
currentPanel.interfaceInteraction = interfaceInteraction
return (currentPanel, selectionPanel)
} else {
let panel = ChatTagSearchInputPanelNode(theme: chatPresentationInterfaceState.theme)
var alwaysShowTotalMessagesCount = false
if case let .customChatContents(contents) = chatPresentationInterfaceState.subject, case .hashTagSearch = contents.kind {
alwaysShowTotalMessagesCount = true
}
let panel = ChatTagSearchInputPanelNode(theme: chatPresentationInterfaceState.theme, alwaysShowTotalMessagesCount: alwaysShowTotalMessagesCount)
panel.context = context
panel.interfaceInteraction = interfaceInteraction
return (panel, selectionPanel)
@@ -403,6 +408,8 @@ func inputPanelForChatPresentationIntefaceState(_ chatPresentationInterfaceState
if case let .customChatContents(customChatContents) = chatPresentationInterfaceState.subject {
switch customChatContents.kind {
case .hashTagSearch:
displayInputTextPanel = false
case .quickReplyMessageInput, .businessLinkSetup:
displayInputTextPanel = true
}