mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various fixes
This commit is contained in:
@@ -9,6 +9,7 @@ import ProgressNavigationButtonNode
|
||||
import AccountContext
|
||||
import SearchUI
|
||||
import ChatListUI
|
||||
import CounterControllerTitleView
|
||||
|
||||
public final class PeerSelectionControllerImpl: ViewController, PeerSelectionController {
|
||||
private let context: AccountContext
|
||||
@@ -64,6 +65,7 @@ public final class PeerSelectionControllerImpl: ViewController, PeerSelectionCon
|
||||
private let forwardedMessageIds: [EngineMessage.Id]
|
||||
private let hasTypeHeaders: Bool
|
||||
private let requestPeerType: [ReplyMarkupButtonRequestPeerType]?
|
||||
let multipleSelectionLimit: Int32?
|
||||
private let hasCreation: Bool
|
||||
let immediatelyActivateMultipleSelection: Bool
|
||||
|
||||
@@ -81,6 +83,7 @@ public final class PeerSelectionControllerImpl: ViewController, PeerSelectionCon
|
||||
}
|
||||
}
|
||||
|
||||
private(set) var titleView: CounterControllerTitleView?
|
||||
private var searchContentNode: NavigationBarSearchContentNode?
|
||||
var tabContainerNode: ChatListFilterTabContainerNode?
|
||||
private var tabContainerData: ([ChatListFilterTabEntry], Bool, Int32?)?
|
||||
@@ -107,6 +110,7 @@ public final class PeerSelectionControllerImpl: ViewController, PeerSelectionCon
|
||||
self.requestPeerType = params.requestPeerType
|
||||
self.hasCreation = params.hasCreation
|
||||
self.immediatelyActivateMultipleSelection = params.immediatelyActivateMultipleSelection
|
||||
self.multipleSelectionLimit = params.multipleSelectionLimit
|
||||
|
||||
super.init(navigationBarPresentationData: NavigationBarPresentationData(presentationData: self.presentationData))
|
||||
|
||||
@@ -133,7 +137,13 @@ public final class PeerSelectionControllerImpl: ViewController, PeerSelectionCon
|
||||
}
|
||||
}
|
||||
|
||||
self.title = self.customTitle ?? self.presentationData.strings.Conversation_ForwardTitle
|
||||
if let maxCount = params.multipleSelectionLimit {
|
||||
self.titleView = CounterControllerTitleView(theme: self.presentationData.theme)
|
||||
self.titleView?.title = CounterControllerTitle(title: self.customTitle ?? self.presentationData.strings.Conversation_ForwardTitle, counter: "0/\(maxCount)")
|
||||
self.navigationItem.titleView = self.titleView
|
||||
} else {
|
||||
self.title = self.customTitle ?? self.presentationData.strings.Conversation_ForwardTitle
|
||||
}
|
||||
|
||||
if params.forumPeerId == nil {
|
||||
self.navigationPresentation = .modal
|
||||
|
||||
Reference in New Issue
Block a user