Update API and fix phone input format

This commit is contained in:
Ali
2021-11-25 19:39:34 +04:00
parent 17ca45d496
commit e5f27d389a
22 changed files with 61 additions and 416 deletions

View File

@@ -8,6 +8,7 @@ import TelegramPresentationData
import TextFormat
import AuthorizationUI
import CodeInputView
import PhoneNumberFormat
final class AuthorizationSequenceCodeEntryControllerNode: ASDisplayNode, UITextFieldDelegate {
private let strings: PresentationStrings
@@ -278,7 +279,11 @@ final class AuthorizationSequenceCodeEntryControllerNode: ASDisplayNode, UITextF
case let .otherSession(length):
codeLength = Int(length)
case let .missedCall(prefix, length):
codePrefix = prefix
if prefix.hasPrefix("+") {
codePrefix = prefix
} else {
codePrefix = InteractivePhoneFormatter().updateText("+" + prefix).1
}
codeLength = Int(length)
case let .sms(length):
codeLength = Int(length)