Various improvements

This commit is contained in:
Isaac 2024-02-02 14:32:13 +01:00
parent 48531db09e
commit bd4a534097
66 changed files with 1502 additions and 370 deletions

View file

@ -406,13 +406,13 @@ func updateChatPresentationInterfaceStateImpl(
if updatedChatPresentationInterfaceState.historyFilter != nil {
canDisplayAsList = true
}
if selfController.alwaysShowSearchResultsAsList {
canDisplayAsList = true
}
if case .peer(selfController.context.account.peerId) = updatedChatPresentationInterfaceState.chatLocation {
canDisplayAsList = true
}
}
if selfController.alwaysShowSearchResultsAsList {
canDisplayAsList = true
}
if !canDisplayAsList {
updatedChatPresentationInterfaceState = updatedChatPresentationInterfaceState.updatedDisplayHistoryFilterAsList(false)
@ -575,8 +575,8 @@ func updateChatPresentationInterfaceStateImpl(
if case .tag = selfController.chatDisplayNode.historyNode.tag {
} else {
if let historyFilter = selfController.presentationInterfaceState.historyFilter {
selfController.chatDisplayNode.historyNode.updateTag(tag: .customTag(historyFilter.customTag))
if let historyFilter = selfController.presentationInterfaceState.historyFilter, historyFilter.isActive {
selfController.chatDisplayNode.historyNode.updateTag(tag: .customTag(historyFilter.customTag, nil))
} else {
selfController.chatDisplayNode.historyNode.updateTag(tag: nil)
}