mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Recent apps
This commit is contained in:
parent
61578961ce
commit
d15818649b
20 changed files with 1140 additions and 601 deletions
|
|
@ -145,6 +145,7 @@ public final class ChatListSearchContainerNode: SearchDisplayControllerContentNo
|
|||
private var validLayout: (ContainerViewLayout, CGFloat)?
|
||||
|
||||
private let sharedOpenStoryDisposable = MetaDisposable()
|
||||
private var recentAppsDisposable: Disposable?
|
||||
|
||||
public init(context: AccountContext, animationCache: AnimationCache, animationRenderer: MultiAnimationRenderer, updatedPresentationData: (initial: PresentationData, signal: Signal<PresentationData, NoError>)? = nil, filter: ChatListNodePeersFilter, requestPeerType: [ReplyMarkupButtonRequestPeerType]?, location: ChatListControllerLocation, displaySearchFilters: Bool, hasDownloads: Bool, initialFilter: ChatListSearchFilter = .chats, openPeer originalOpenPeer: @escaping (EnginePeer, EnginePeer?, Int64?, Bool) -> Void, openDisabledPeer: @escaping (EnginePeer, Int64?, ChatListDisabledPeerReason) -> Void, openRecentPeerOptions: @escaping (EnginePeer) -> Void, openMessage originalOpenMessage: @escaping (EnginePeer, Int64?, EngineMessage.Id, Bool) -> Void, addContact: ((String) -> Void)?, peerContextAction: ((EnginePeer, ChatListSearchContextActionSource, ASDisplayNode, ContextGesture?, CGPoint?) -> Void)?, present: @escaping (ViewController, Any?) -> Void, presentInGlobalOverlay: @escaping (ViewController, Any?) -> Void, navigationController: NavigationController?, parentController: @escaping () -> ViewController?) {
|
||||
var initialFilter = initialFilter
|
||||
|
|
@ -293,6 +294,8 @@ public final class ChatListSearchContainerNode: SearchDisplayControllerContentNo
|
|||
filterKey = .topics
|
||||
case .channels:
|
||||
filterKey = .channels
|
||||
case .apps:
|
||||
filterKey = .apps
|
||||
case .media:
|
||||
filterKey = .media
|
||||
case .downloads:
|
||||
|
|
@ -347,6 +350,8 @@ public final class ChatListSearchContainerNode: SearchDisplayControllerContentNo
|
|||
key = .topics
|
||||
case .channels:
|
||||
key = .channels
|
||||
case .apps:
|
||||
key = .apps
|
||||
case .media:
|
||||
key = .media
|
||||
case .downloads:
|
||||
|
|
@ -386,7 +391,7 @@ public final class ChatListSearchContainerNode: SearchDisplayControllerContentNo
|
|||
switch filter {
|
||||
case let .filter(filter):
|
||||
switch filter {
|
||||
case .downloads, .channels:
|
||||
case .downloads, .channels, .apps:
|
||||
return false
|
||||
default:
|
||||
return true
|
||||
|
|
@ -518,6 +523,8 @@ public final class ChatListSearchContainerNode: SearchDisplayControllerContentNo
|
|||
})
|
||||
}
|
||||
|
||||
self.recentAppsDisposable = context.engine.peers.managedUpdatedRecentApps().startStrict()
|
||||
|
||||
self._ready.set(self.paneContainerNode.isReady.get()
|
||||
|> map { _ in Void() })
|
||||
}
|
||||
|
|
@ -528,6 +535,7 @@ public final class ChatListSearchContainerNode: SearchDisplayControllerContentNo
|
|||
self.suggestedFiltersDisposable.dispose()
|
||||
self.shareStatusDisposable?.dispose()
|
||||
self.sharedOpenStoryDisposable.dispose()
|
||||
self.recentAppsDisposable?.dispose()
|
||||
|
||||
self.copyProtectionTooltipController?.dismiss()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue