mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Fix search activation
This commit is contained in:
parent
6789c8b486
commit
9b87791908
@ -1678,9 +1678,8 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController,
|
|||||||
|
|
||||||
public func activateSearch() {
|
public func activateSearch() {
|
||||||
if self.displayNavigationBar {
|
if self.displayNavigationBar {
|
||||||
let _ = (self.chatListDisplayNode.containerNode.currentItemNode.contentsReady
|
let _ = (combineLatest(self.chatListDisplayNode.containerNode.currentItemNode.contentsReady |> take(1), self.context.account.postbox.tailChatListView(groupId: .root, count: 16, summaryComponents: ChatListEntrySummaryComponents(tagSummary: nil, actionsSummary: nil)) |> take(1))
|
||||||
|> take(1)
|
|> deliverOnMainQueue).start(next: { [weak self] _, chatListView in
|
||||||
|> deliverOnMainQueue).start(completed: { [weak self] in
|
|
||||||
guard let strongSelf = self else {
|
guard let strongSelf = self else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -1689,7 +1688,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController,
|
|||||||
}
|
}
|
||||||
|
|
||||||
var displaySearchFilters = true
|
var displaySearchFilters = true
|
||||||
if strongSelf.chatListDisplayNode.containerNode.mainItemNode.entriesCount < 10 {
|
if chatListView.0.entries.count < 10 {
|
||||||
displaySearchFilters = false
|
displaySearchFilters = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -431,10 +431,6 @@ final class ChatListContainerNode: ASDisplayNode, UIGestureRecognizerDelegate {
|
|||||||
return self.currentItemNodeValue!.listNode
|
return self.currentItemNodeValue!.listNode
|
||||||
}
|
}
|
||||||
|
|
||||||
var mainItemNode: ChatListNode {
|
|
||||||
return self.itemNodes[.all]!.listNode
|
|
||||||
}
|
|
||||||
|
|
||||||
private let currentItemStateValue = Promise<(state: ChatListNodeState, filterId: Int32?)>()
|
private let currentItemStateValue = Promise<(state: ChatListNodeState, filterId: Int32?)>()
|
||||||
var currentItemState: Signal<(state: ChatListNodeState, filterId: Int32?), NoError> {
|
var currentItemState: Signal<(state: ChatListNodeState, filterId: Int32?), NoError> {
|
||||||
return self.currentItemStateValue.get()
|
return self.currentItemStateValue.get()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user