Fix build

This commit is contained in:
Ilya Laktyushin
2023-03-08 13:57:22 +04:00
parent 4c5f4c9590
commit 685b0a765c
7 changed files with 56 additions and 15 deletions

View File

@@ -23,6 +23,7 @@ public final class AuthorizationSequenceCodeEntryController: ViewController {
var reset: (() -> Void)?
var requestNextOption: (() -> Void)?
var resetEmail: (() -> Void)?
var data: (String, String?, SentAuthorizationCodeType, AuthorizationCodeNextType?, Int32?)?
var termsOfService: (UnauthorizedAccountTermsOfService, Bool)?
@@ -109,13 +110,17 @@ public final class AuthorizationSequenceCodeEntryController: ViewController {
self?.navigationItem.rightBarButtonItem?.isEnabled = value
}
self.controllerNode.reset = { [weak self] in
self?.resetEmail?()
}
self.controllerNode.present = { [weak self] c, a in
self?.present(c, in: .window(.root), with: a)
}
if let (number, email, codeType, nextType, timeout) = self.data {
var appleSignInAllowed = false
if case let .email(_, _, _, appleSignInAllowedValue, _) = codeType {
if case let .email(_, _, _, _, appleSignInAllowedValue, _) = codeType {
appleSignInAllowed = appleSignInAllowedValue
}
self.controllerNode.updateData(number: number, email: email, codeType: codeType, nextType: nextType, timeout: timeout, appleSignInAllowed: appleSignInAllowed)
@@ -164,7 +169,7 @@ public final class AuthorizationSequenceCodeEntryController: ViewController {
self.data = (number, email, codeType, nextType, timeout)
var appleSignInAllowed = false
if case let .email(_, _, _, appleSignInAllowedValue, _) = codeType {
if case let .email(_, _, _, _, appleSignInAllowedValue, _) = codeType {
appleSignInAllowed = appleSignInAllowedValue
}
@@ -204,7 +209,7 @@ public final class AuthorizationSequenceCodeEntryController: ViewController {
minimalCodeLength = Int(length)
case let .missedCall(_, length):
minimalCodeLength = Int(length)
case let .email(_, length, _, _, _):
case let .email(_, length, _, _, _, _):
minimalCodeLength = Int(length)
case let .fragment(_, length):
minimalCodeLength = Int(length)