www.fgks.org   »   [go: up one dir, main page]

Skip to content

Commit

Permalink
Authorization improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
laktyushin committed Apr 22, 2024
1 parent 1f8e9b5 commit f199fe9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -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
Expand Down
Expand Up @@ -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?
Expand Down

0 comments on commit f199fe9

Please sign in to comment.