mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various improvements
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user