Search filters improvements

This commit is contained in:
Ilya Laktyushin
2020-09-25 19:11:58 +03:00
parent bb27a2ba5d
commit cefc01f28c
28 changed files with 551 additions and 299 deletions

View File

@@ -1703,8 +1703,9 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController,
public func deactivateSearch(animated: Bool) {
if !self.displayNavigationBar {
var completion: (() -> Void)?
if let searchContentNode = self.searchContentNode {
self.chatListDisplayNode.deactivateSearch(placeholderNode: searchContentNode.placeholderNode, animated: animated)
completion = self.chatListDisplayNode.deactivateSearch(placeholderNode: searchContentNode.placeholderNode, animated: animated)
}
let filtersIsEmpty: Bool
@@ -1722,6 +1723,8 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController,
let transition: ContainedViewLayoutTransition = animated ? .animated(duration: 0.4, curve: .spring) : .immediate
self.setDisplayNavigationBar(true, transition: transition)
completion?()
(self.parent as? TabBarController)?.updateIsTabBarHidden(false, transition: .animated(duration: 0.4, curve: .spring))
}
}