mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02: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:
@@ -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) {
|
||||
|
||||
@@ -22,10 +22,11 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
||||
|
||||
#include "boxes/peer_list_box.h"
|
||||
#include "boxes/edit_privacy_box.h"
|
||||
#include "mtproto/sender.h"
|
||||
|
||||
namespace Settings {
|
||||
|
||||
class BlockedBoxController : public QObject, public PeerListBox::Controller, private base::Subscriber {
|
||||
class BlockedBoxController : public PeerListBox::Controller, private base::Subscriber, private MTP::Sender {
|
||||
public:
|
||||
void prepare() override;
|
||||
void rowClicked(PeerListBox::Row *row) override;
|
||||
|
||||
Reference in New Issue
Block a user