2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +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

@@ -58,7 +58,7 @@ void RemoveAdmin(
if (onDone) {
onDone();
}
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
if (onFail) {
onFail();
}
@@ -79,7 +79,7 @@ void AddChatParticipant(
if (onDone) {
onDone();
}
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
ShowAddParticipantsError(error.type(), chat, { 1, user });
if (onFail) {
onFail();
@@ -103,7 +103,7 @@ void SaveChatAdmin(
if (onDone) {
onDone();
}
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
const auto &type = error.type();
if (retryOnNotParticipant
&& isAdmin
@@ -136,7 +136,7 @@ void SaveChannelAdmin(
if (onDone) {
onDone();
}
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
ShowAddParticipantsError(error.type(), channel, { 1, user });
if (onFail) {
onFail();
@@ -161,7 +161,7 @@ void SaveChannelRestriction(
if (onDone) {
onDone();
}
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
if (onFail) {
onFail();
}
@@ -182,7 +182,7 @@ void SaveChatParticipantKick(
if (onDone) {
onDone();
}
}).fail([=](const RPCError &error) {
}).fail([=](const MTP::Error &error) {
if (onFail) {
onFail();
}
@@ -1336,7 +1336,7 @@ void ParticipantsBoxController::loadMoreRows() {
_onlineSorter->sort();
}
delegate()->peerListRefreshRows();
}).fail([this](const RPCError &error) {
}).fail([this](const MTP::Error &error) {
_loadRequestId = 0;
}).send();
}
@@ -2071,7 +2071,7 @@ bool ParticipantsBoxSearchController::loadMoreRows() {
const MTPchannels_ChannelParticipants &result,
mtpRequestId requestId) {
searchDone(requestId, result, perPage);
}).fail([=](const RPCError &error, mtpRequestId requestId) {
}).fail([=](const MTP::Error &error, mtpRequestId requestId) {
if (_requestId == requestId) {
_requestId = 0;
_allLoaded = true;