2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 23:25:15 +00:00

Removed MTP* from PrePasswordErrorBox.

This commit is contained in:
23rd
2021-11-26 07:38:00 +03:00
committed by John Preston
parent 0c3b289af9
commit 287a35d208
5 changed files with 12 additions and 20 deletions

View File

@@ -1438,15 +1438,14 @@ RecoveryEmailValidation ConfirmRecoveryEmail(
}
[[nodiscard]] object_ptr<Ui::GenericBox> PrePasswordErrorBox(
const MTP::Error &error,
const QString &error,
not_null<Main::Session*> session,
TextWithEntities &&about) {
const auto type = [&] {
const auto &type = error.type();
if (type == qstr("PASSWORD_MISSING")) {
if (error == u"PASSWORD_MISSING"_q) {
return PasswordErrorType::NoPassword;
} else if (type.startsWith(qstr("PASSWORD_TOO_FRESH_"))
|| type.startsWith(qstr("SESSION_TOO_FRESH_"))) {
} else if (error.startsWith(u"PASSWORD_TOO_FRESH_"_q)
|| error.startsWith(u"SESSION_TOO_FRESH_"_q)) {
return PasswordErrorType::Later;
}
return PasswordErrorType::None;