mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-02 00:17:02 +00:00
Fix passport plaintext controller presentation
This commit is contained in:
parent
6302373ab2
commit
3beebbf3ce
@ -700,7 +700,7 @@ final class SecureIdAuthControllerNode: ViewControllerTracingNode {
|
|||||||
guard let strongSelf = self else {
|
guard let strongSelf = self else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
strongSelf.interaction.present(SecureIdPlaintextFormController(context: strongSelf.context, secureIdContext: secureIdContext, type: type, immediatelyAvailableValue: immediatelyAvailableValue, updatedValue: { valueWithContext in
|
strongSelf.interaction.push(SecureIdPlaintextFormController(context: strongSelf.context, secureIdContext: secureIdContext, type: type, immediatelyAvailableValue: immediatelyAvailableValue, updatedValue: { valueWithContext in
|
||||||
if let strongSelf = self {
|
if let strongSelf = self {
|
||||||
strongSelf.interaction.updateState { state in
|
strongSelf.interaction.updateState { state in
|
||||||
if case let .form(form) = state, let formData = form.formData {
|
if case let .form(form) = state, let formData = form.formData {
|
||||||
@ -723,7 +723,7 @@ final class SecureIdAuthControllerNode: ViewControllerTracingNode {
|
|||||||
return state
|
return state
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}), nil)
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
if let currentValue = currentValue {
|
if let currentValue = currentValue {
|
||||||
@ -941,9 +941,9 @@ final class SecureIdAuthControllerNode: ViewControllerTracingNode {
|
|||||||
if let peer = list.accountPeer as? TelegramUser, let phone = peer.phone, !phone.isEmpty {
|
if let peer = list.accountPeer as? TelegramUser, let phone = peer.phone, !phone.isEmpty {
|
||||||
immediatelyAvailableValue = .phone(SecureIdPhoneValue(phone: phone))
|
immediatelyAvailableValue = .phone(SecureIdPhoneValue(phone: phone))
|
||||||
}
|
}
|
||||||
self.interaction.present(SecureIdPlaintextFormController(context: self.context, secureIdContext: secureIdContext, type: .phone, immediatelyAvailableValue: immediatelyAvailableValue, updatedValue: { value in
|
self.interaction.push(SecureIdPlaintextFormController(context: self.context, secureIdContext: secureIdContext, type: .phone, immediatelyAvailableValue: immediatelyAvailableValue, updatedValue: { value in
|
||||||
updatedValues(.phone)(value.flatMap({ [$0] }) ?? [])
|
updatedValues(.phone)(value.flatMap({ [$0] }) ?? [])
|
||||||
}), nil)
|
}))
|
||||||
}
|
}
|
||||||
case .email:
|
case .email:
|
||||||
if findValue(values, key: .email) != nil {
|
if findValue(values, key: .email) != nil {
|
||||||
@ -953,9 +953,9 @@ final class SecureIdAuthControllerNode: ViewControllerTracingNode {
|
|||||||
if let email = list.twoStepEmail {
|
if let email = list.twoStepEmail {
|
||||||
immediatelyAvailableValue = .email(SecureIdEmailValue(email: email))
|
immediatelyAvailableValue = .email(SecureIdEmailValue(email: email))
|
||||||
}
|
}
|
||||||
self.interaction.present(SecureIdPlaintextFormController(context: self.context, secureIdContext: secureIdContext, type: .email, immediatelyAvailableValue: immediatelyAvailableValue, updatedValue: { value in
|
self.interaction.push(SecureIdPlaintextFormController(context: self.context, secureIdContext: secureIdContext, type: .email, immediatelyAvailableValue: immediatelyAvailableValue, updatedValue: { value in
|
||||||
updatedValues(.email)(value.flatMap({ [$0] }) ?? [])
|
updatedValues(.email)(value.flatMap({ [$0] }) ?? [])
|
||||||
}), nil)
|
}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,8 @@ public final class SecureIdPlaintextFormController: FormController<SecureIdPlain
|
|||||||
|
|
||||||
super.init(initParams: SecureIdPlaintextFormControllerNodeInitParams(context: context, secureIdContext: secureIdContext), presentationData: self.presentationData)
|
super.init(initParams: SecureIdPlaintextFormControllerNodeInitParams(context: context, secureIdContext: secureIdContext), presentationData: self.presentationData)
|
||||||
|
|
||||||
|
self.navigationPresentation = .modal
|
||||||
|
|
||||||
switch type {
|
switch type {
|
||||||
case .phone:
|
case .phone:
|
||||||
self.title = self.presentationData.strings.Passport_Phone_Title
|
self.title = self.presentationData.strings.Passport_Phone_Title
|
||||||
|
Loading…
x
Reference in New Issue
Block a user