Search filters fixes

This commit is contained in:
Ilya Laktyushin
2020-09-29 00:21:11 +04:00
parent 78c90bceaf
commit 45cbb2a804
12 changed files with 206 additions and 126 deletions

View File

@@ -15,7 +15,7 @@ final class OverlayAudioPlayerControllerImpl: ViewController, OverlayAudioPlayer
let type: MediaManagerPlayerType
let initialMessageId: MessageId
let initialOrder: MusicPlaybackSettingsOrder
let isGlobalSearch: Bool
let playlistLocation: SharedMediaPlaylistLocation?
private weak var parentNavigationController: NavigationController?
@@ -27,13 +27,13 @@ final class OverlayAudioPlayerControllerImpl: ViewController, OverlayAudioPlayer
private var accountInUseDisposable: Disposable?
init(context: AccountContext, peerId: PeerId, type: MediaManagerPlayerType, initialMessageId: MessageId, initialOrder: MusicPlaybackSettingsOrder, isGlobalSearch: Bool = false, parentNavigationController: NavigationController?) {
init(context: AccountContext, peerId: PeerId, type: MediaManagerPlayerType, initialMessageId: MessageId, initialOrder: MusicPlaybackSettingsOrder, playlistLocation: SharedMediaPlaylistLocation? = nil, parentNavigationController: NavigationController?) {
self.context = context
self.peerId = peerId
self.type = type
self.initialMessageId = initialMessageId
self.initialOrder = initialOrder
self.isGlobalSearch = isGlobalSearch
self.playlistLocation = playlistLocation
self.parentNavigationController = parentNavigationController
super.init(navigationBarPresentationData: nil)
@@ -54,7 +54,7 @@ final class OverlayAudioPlayerControllerImpl: ViewController, OverlayAudioPlayer
}
override public func loadDisplayNode() {
self.displayNode = OverlayAudioPlayerControllerNode(context: self.context, peerId: self.peerId, type: self.type, initialMessageId: self.initialMessageId, initialOrder: self.initialOrder, isGlobalSearch: self.isGlobalSearch, requestDismiss: { [weak self] in
self.displayNode = OverlayAudioPlayerControllerNode(context: self.context, peerId: self.peerId, type: self.type, initialMessageId: self.initialMessageId, initialOrder: self.initialOrder, playlistLocation: self.playlistLocation, requestDismiss: { [weak self] in
self?.dismiss()
}, requestShare: { [weak self] messageId in
if let strongSelf = self {