2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-09 10:55:19 +00:00

Rename RPCError to MTP::Error.

This commit is contained in:
John Preston
2021-03-12 16:48:00 +04:00
parent 5794679277
commit 68b0a85369
130 changed files with 609 additions and 594 deletions

View File

@@ -266,8 +266,8 @@ void CodeWidget::codeSubmitDone(const MTPauth_Authorization &result) {
});
}
void CodeWidget::codeSubmitFail(const RPCError &error) {
if (MTP::isFloodError(error)) {
void CodeWidget::codeSubmitFail(const MTP::Error &error) {
if (MTP::IsFloodError(error)) {
stopCheck();
_sentRequest = 0;
showCodeError(tr::lng_flood_error());
@@ -288,7 +288,7 @@ void CodeWidget::codeSubmitFail(const RPCError &error) {
_sentRequest = api().request(MTPaccount_GetPassword(
)).done([=](const MTPaccount_Password &result) {
gotPassword(result);
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
codeSubmitFail(error);
}).handleFloodErrors().send();
} else if (Logs::DebugEnabled()) { // internal server error
@@ -391,7 +391,7 @@ void CodeWidget::submit() {
MTP_string(_sentCode)
)).done([=](const MTPauth_Authorization &result) {
codeSubmitDone(result);
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
codeSubmitFail(error);
}).handleFloodErrors().send();
}
@@ -405,7 +405,7 @@ void CodeWidget::noTelegramCode() {
MTP_bytes(getData()->phoneHash)
)).done([=](const MTPauth_SentCode &result) {
noTelegramCodeDone(result);
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
noTelegramCodeFail(error);
}).handleFloodErrors().send();
}
@@ -433,8 +433,8 @@ void CodeWidget::noTelegramCodeDone(const MTPauth_SentCode &result) {
updateDescText();
}
void CodeWidget::noTelegramCodeFail(const RPCError &error) {
if (MTP::isFloodError(error)) {
void CodeWidget::noTelegramCodeFail(const MTP::Error &error) {
if (MTP::IsFloodError(error)) {
_noTelegramCodeRequestId = 0;
showCodeError(tr::lng_flood_error());
return;