Various improvements

This commit is contained in:
Ilya Laktyushin
2022-06-03 21:16:22 +04:00
parent 1843d3c824
commit 0b781d977e
58 changed files with 1488 additions and 168 deletions

View File

@@ -265,7 +265,22 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
strongSelf.chatListDisplayNode.containerNode.currentItemNode.scrollToPosition(.top)
case let .known(offset):
if offset <= navigationBarSearchContentHeight + 1.0 && strongSelf.chatListDisplayNode.containerNode.currentItemNode.chatListFilter != nil {
strongSelf.selectTab(id: .all)
let _ = (strongSelf.context.engine.peers.currentChatListFilters()
|> deliverOnMainQueue).start(next: { [weak self] filters in
guard let strongSelf = self else {
return
}
let targetTab: ChatListFilterTabEntryId
let firstFilter = filters.first ?? .allChats
switch firstFilter {
case .allChats:
targetTab = .all
case let .filter(id, _, _, _):
targetTab = .filter(id)
}
strongSelf.selectTab(id: targetTab)
})
} else {
if let searchContentNode = strongSelf.searchContentNode {
searchContentNode.updateExpansionProgress(1.0, animated: true)