mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Authorization improvements
This commit is contained in:
parent
1f8e9b568a
commit
f199fe9641
@ -1040,7 +1040,7 @@ final class AuthorizationSequenceCodeEntryControllerNode: ASDisplayNode, UITextF
|
||||
if let startsWith, !text.isEmpty {
|
||||
let firstWord = text.components(separatedBy: " ").first ?? ""
|
||||
if !firstWord.isEmpty && !startsWith.hasPrefix(firstWord) {
|
||||
if self.errorTextNode.alpha.isZero, text.count < 3 {
|
||||
if self.errorTextNode.alpha.isZero, text.count < 4 {
|
||||
self.animateError(text: self.strings.Login_WrongPhraseError)
|
||||
}
|
||||
return false
|
||||
|
@ -1232,8 +1232,8 @@ public final class AuthorizationSequenceController: NavigationController, ASAuth
|
||||
controllers.append(self.emailSetupController(number: number, appleSignInAllowed: self.appleSignInAllowed))
|
||||
}
|
||||
|
||||
if let previousCodeEntry, case let .confirmationCodeEntry(number, type, phoneCodeHash, timeout, nextType, _, _, _) = previousCodeEntry, usePrevious {
|
||||
controllers.append(self.codeEntryController(number: number, phoneCodeHash: phoneCodeHash, email: self.currentEmail, type: type, nextType: nextType, timeout: timeout, previousCodeType: type, isPrevious: true, termsOfService: nil))
|
||||
if let previousCodeEntry, case let .confirmationCodeEntry(number, previousType, phoneCodeHash, timeout, nextType, _, _, _) = previousCodeEntry, usePrevious {
|
||||
controllers.append(self.codeEntryController(number: number, phoneCodeHash: phoneCodeHash, email: self.currentEmail, type: previousType, nextType: nextType, timeout: timeout, previousCodeType: type, isPrevious: true, termsOfService: nil))
|
||||
isGoingBack = true
|
||||
} else {
|
||||
var previousCodeType: SentAuthorizationCodeType?
|
||||
|
Loading…
x
Reference in New Issue
Block a user