mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
no message
This commit is contained in:
@@ -26,6 +26,8 @@ final class AuthorizationSequencePasswordEntryControllerNode: ASDisplayNode, UIT
|
||||
|
||||
var didForgotWithNoRecovery = false
|
||||
|
||||
private var clearOnce: Bool = false
|
||||
|
||||
var inProgress: Bool = false {
|
||||
didSet {
|
||||
self.codeField.alpha = self.inProgress ? 0.6 : 1.0
|
||||
@@ -142,8 +144,19 @@ final class AuthorizationSequencePasswordEntryControllerNode: ASDisplayNode, UIT
|
||||
self.codeField.layer.addShakeAnimation()
|
||||
}
|
||||
|
||||
@objc func passwordFieldTextChanged(_ textField: UITextField) {
|
||||
|
||||
func passwordIsInvalid() {
|
||||
self.clearOnce = true
|
||||
}
|
||||
|
||||
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
|
||||
if self.clearOnce {
|
||||
self.clearOnce = false
|
||||
if range.length > string.count {
|
||||
textField.text = ""
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
|
||||
|
||||
Reference in New Issue
Block a user