Various improvements

This commit is contained in:
Ilya Laktyushin
2024-11-13 02:17:43 +04:00
parent 888fd0254e
commit 9025c8f74d
18 changed files with 347 additions and 149 deletions

View File

@@ -65,6 +65,7 @@ public final class PeerSelectionControllerImpl: ViewController, PeerSelectionCon
private let hasTypeHeaders: Bool
private let requestPeerType: [ReplyMarkupButtonRequestPeerType]?
private let hasCreation: Bool
let immediatelyActivateMultipleSelection: Bool
override public var _presentedInModal: Bool {
get {
@@ -105,6 +106,7 @@ public final class PeerSelectionControllerImpl: ViewController, PeerSelectionCon
self.selectForumThreads = params.selectForumThreads
self.requestPeerType = params.requestPeerType
self.hasCreation = params.hasCreation
self.immediatelyActivateMultipleSelection = params.immediatelyActivateMultipleSelection
super.init(navigationBarPresentationData: NavigationBarPresentationData(presentationData: self.presentationData))
@@ -167,7 +169,11 @@ public final class PeerSelectionControllerImpl: ViewController, PeerSelectionCon
})
self.navigationBar?.setContentNode(self.searchContentNode, animated: false)
if params.multipleSelection {
if params.immediatelyActivateMultipleSelection {
Queue.mainQueue().after(0.1) {
self.beginSelection()
}
} else if params.multipleSelection {
self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: self.presentationData.strings.Common_Select, style: .plain, target: self, action: #selector(self.beginSelection))
}