2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Removed unused MTP::Error from callbacks on fail.

This commit is contained in:
23rd
2021-11-26 23:46:53 +03:00
committed by John Preston
parent 287a35d208
commit 3647241f71
62 changed files with 158 additions and 182 deletions

View File

@@ -478,10 +478,6 @@ void PasscodeBox::closeReplacedBy() {
}
}
void PasscodeBox::setPasswordFail(const MTP::Error &error) {
setPasswordFail(error.type());
}
void PasscodeBox::setPasswordFail(const QString &type) {
if (MTP::IsFloodError(type)) {
closeReplacedBy();
@@ -533,7 +529,7 @@ void PasscodeBox::setPasswordFail(
validateEmail(email, codeLength, newPasswordBytes);
} else {
setPasswordFail(error);
setPasswordFail(error.type());
}
}
@@ -582,7 +578,7 @@ void PasscodeBox::validateEmail(
)).done([=](const MTPBool &result) {
_setRequest = 0;
resent->fire(tr::lng_cloud_password_resent(tr::now));
}).fail([=](const MTP::Error &error) {
}).fail([=] {
_setRequest = 0;
errors->fire(Lang::Hard::ServerError());
}).send();
@@ -942,7 +938,7 @@ void PasscodeBox::changeCloudPassword(
});
}
}).fail([=](const MTP::Error &error) {
setPasswordFail(error);
setPasswordFail(error.type());
}).handleFloodErrors().send();
}
@@ -1419,7 +1415,7 @@ RecoveryEmailValidation ConfirmRecoveryEmail(
)).done([=](const MTPBool &result) {
*requestId = 0;
resent->fire(tr::lng_cloud_password_resent(tr::now));
}).fail([=](const MTP::Error &error) {
}).fail([=] {
*requestId = 0;
errors->fire(Lang::Hard::ServerError());
}).send();