mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
no message
This commit is contained in:
@@ -7,15 +7,18 @@ final class AuthorizationSequencePhoneEntryController: ViewController {
|
||||
return self.displayNode as! AuthorizationSequencePhoneEntryControllerNode
|
||||
}
|
||||
|
||||
private let strings: PresentationStrings
|
||||
private let theme: AuthorizationTheme
|
||||
|
||||
private var currentData: (Int32, String)?
|
||||
|
||||
var inProgress: Bool = false {
|
||||
didSet {
|
||||
if self.inProgress {
|
||||
let item = UIBarButtonItem(customDisplayNode: ProgressNavigationButtonNode())
|
||||
let item = UIBarButtonItem(customDisplayNode: ProgressNavigationButtonNode(color: self.theme.accentColor))
|
||||
self.navigationItem.rightBarButtonItem = item
|
||||
} else {
|
||||
self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Next", style: .done, target: self, action: #selector(self.nextPressed))
|
||||
self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: self.strings.Common_Next, style: .done, target: self, action: #selector(self.nextPressed))
|
||||
}
|
||||
self.controllerNode.inProgress = self.inProgress
|
||||
}
|
||||
@@ -24,10 +27,17 @@ final class AuthorizationSequencePhoneEntryController: ViewController {
|
||||
|
||||
private let hapticFeedback = HapticFeedback()
|
||||
|
||||
init() {
|
||||
super.init(navigationBarTheme: AuthorizationSequenceController.navigationBarTheme)
|
||||
init(strings: PresentationStrings, theme: AuthorizationTheme) {
|
||||
self.strings = strings
|
||||
self.theme = theme
|
||||
|
||||
self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Next", style: .done, target: self, action: #selector(self.nextPressed))
|
||||
super.init(navigationBarTheme: AuthorizationSequenceController.navigationBarTheme(theme))
|
||||
|
||||
self.hasActiveInput = true
|
||||
|
||||
self.statusBar.statusBarStyle = theme.statusBarStyle
|
||||
|
||||
self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: strings.Common_Next, style: .done, target: self, action: #selector(self.nextPressed))
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
@@ -44,11 +54,11 @@ final class AuthorizationSequencePhoneEntryController: ViewController {
|
||||
}
|
||||
|
||||
override public func loadDisplayNode() {
|
||||
self.displayNode = AuthorizationSequencePhoneEntryControllerNode()
|
||||
self.displayNode = AuthorizationSequencePhoneEntryControllerNode(strings: self.strings, theme: self.theme)
|
||||
self.displayNodeDidLoad()
|
||||
self.controllerNode.selectCountryCode = { [weak self] in
|
||||
if let strongSelf = self {
|
||||
let controller = AuthorizationSequenceCountrySelectionController()
|
||||
let controller = AuthorizationSequenceCountrySelectionController(strings: strongSelf.strings, theme: strongSelf.theme)
|
||||
controller.completeWithCountryCode = { code, _ in
|
||||
if let strongSelf = self, let currentData = strongSelf.currentData {
|
||||
strongSelf.updateData(countryCode: Int32(code), number: currentData.1)
|
||||
@@ -76,7 +86,7 @@ final class AuthorizationSequencePhoneEntryController: ViewController {
|
||||
override func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) {
|
||||
super.containerLayoutUpdated(layout, transition: transition)
|
||||
|
||||
self.controllerNode.containerLayoutUpdated(layout, navigationBarHeight: 0.0, transition: transition)
|
||||
self.controllerNode.containerLayoutUpdated(layout, navigationBarHeight: self.navigationHeight, transition: transition)
|
||||
}
|
||||
|
||||
@objc func nextPressed() {
|
||||
|
||||
Reference in New Issue
Block a user