mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Various improvements
This commit is contained in:
parent
c92cc87162
commit
d080951f11
6 changed files with 51 additions and 10 deletions
|
|
@ -398,7 +398,23 @@ func updateChatPresentationInterfaceStateImpl(
|
|||
}
|
||||
|
||||
if updatedChatPresentationInterfaceState.displayHistoryFilterAsList {
|
||||
if updatedChatPresentationInterfaceState.search?.resultsState == nil && updatedChatPresentationInterfaceState.historyFilter == nil && !selfController.alwaysShowSearchResultsAsList {
|
||||
var canDisplayAsList = false
|
||||
if updatedChatPresentationInterfaceState.search != nil {
|
||||
if updatedChatPresentationInterfaceState.search?.resultsState != nil {
|
||||
canDisplayAsList = true
|
||||
}
|
||||
if updatedChatPresentationInterfaceState.historyFilter != nil {
|
||||
canDisplayAsList = true
|
||||
}
|
||||
if selfController.alwaysShowSearchResultsAsList {
|
||||
canDisplayAsList = true
|
||||
}
|
||||
if case .peer(selfController.context.account.peerId) = updatedChatPresentationInterfaceState.chatLocation {
|
||||
canDisplayAsList = true
|
||||
}
|
||||
}
|
||||
|
||||
if !canDisplayAsList {
|
||||
updatedChatPresentationInterfaceState = updatedChatPresentationInterfaceState.updatedDisplayHistoryFilterAsList(false)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue