mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 22:57:11 +02:00
Remove MTP from Polls::create interface.
This commit is contained in:
parent
d2e1517e7a
commit
3698396677
3 changed files with 4 additions and 4 deletions
|
@ -37,7 +37,7 @@ void Polls::create(
|
|||
const PollData &data,
|
||||
const SendAction &action,
|
||||
Fn<void()> done,
|
||||
Fn<void(const MTP::Error &error)> fail) {
|
||||
Fn<void()> fail) {
|
||||
_session->api().sendAction(action);
|
||||
|
||||
const auto history = action.history;
|
||||
|
@ -101,7 +101,7 @@ void Polls::create(
|
|||
history->finishSavingCloudDraft(
|
||||
UnixtimeFromMsgId(response.outerMsgId));
|
||||
}
|
||||
fail(error);
|
||||
fail();
|
||||
finish();
|
||||
}).afterRequest(history->sendRequestId
|
||||
).send();
|
||||
|
|
|
@ -29,7 +29,7 @@ public:
|
|||
const PollData &data,
|
||||
const SendAction &action,
|
||||
Fn<void()> done,
|
||||
Fn<void(const MTP::Error &error)> fail);
|
||||
Fn<void()> fail);
|
||||
void sendVotes(
|
||||
FullMsgId itemId,
|
||||
const std::vector<QByteArray> &options);
|
||||
|
|
|
@ -1064,7 +1064,7 @@ void PeerMenuCreatePoll(
|
|||
const auto api = &peer->session().api();
|
||||
api->polls().create(result.poll, action, crl::guard(weak, [=] {
|
||||
weak->closeBox();
|
||||
}), crl::guard(weak, [=](const MTP::Error &error) {
|
||||
}), crl::guard(weak, [=] {
|
||||
*lock = false;
|
||||
weak->submitFailed(tr::lng_attach_failed(tr::now));
|
||||
}));
|
||||
|
|
Loading…
Add table
Reference in a new issue