2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Add MTP::Sender to replace RPCSender some day.

Also use c++1z language standard in Xcode build.
Also treat warnings as errors.
This commit is contained in:
John Preston
2017-03-22 18:38:40 +03:00
parent 7fcc5d649c
commit e9ec09b91a
15 changed files with 449 additions and 78 deletions

View File

@@ -114,7 +114,7 @@ void BlockedBoxController::preloadRows() {
return;
}
_loadRequestId = MTP::send(MTPcontacts_GetBlocked(MTP_int(_offset), MTP_int(kBlockedPerPage)), rpcDone(base::lambda_guarded(this, [this](const MTPcontacts_Blocked &result) {
_loadRequestId = request(MTPcontacts_GetBlocked(MTP_int(_offset), MTP_int(kBlockedPerPage))).done([this](const MTPcontacts_Blocked &result) {
_loadRequestId = 0;
if (!_offset) {
@@ -135,13 +135,9 @@ void BlockedBoxController::preloadRows() {
} break;
default: Unexpected("Bad type() in MTPcontacts_GetBlocked() result.");
}
})), rpcFail(base::lambda_guarded(this, [this](const RPCError &error) {
if (MTP::isDefaultHandledError(error)) {
return false;
}
}).fail([this](const RPCError &error) {
_loadRequestId = 0;
return true;
})));
}).send();
}
void BlockedBoxController::rowClicked(PeerListBox::Row *row) {