mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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 PollData &data,
|
||||||
const SendAction &action,
|
const SendAction &action,
|
||||||
Fn<void()> done,
|
Fn<void()> done,
|
||||||
Fn<void(const MTP::Error &error)> fail) {
|
Fn<void()> fail) {
|
||||||
_session->api().sendAction(action);
|
_session->api().sendAction(action);
|
||||||
|
|
||||||
const auto history = action.history;
|
const auto history = action.history;
|
||||||
|
@ -101,7 +101,7 @@ void Polls::create(
|
||||||
history->finishSavingCloudDraft(
|
history->finishSavingCloudDraft(
|
||||||
UnixtimeFromMsgId(response.outerMsgId));
|
UnixtimeFromMsgId(response.outerMsgId));
|
||||||
}
|
}
|
||||||
fail(error);
|
fail();
|
||||||
finish();
|
finish();
|
||||||
}).afterRequest(history->sendRequestId
|
}).afterRequest(history->sendRequestId
|
||||||
).send();
|
).send();
|
||||||
|
|
|
@ -29,7 +29,7 @@ public:
|
||||||
const PollData &data,
|
const PollData &data,
|
||||||
const SendAction &action,
|
const SendAction &action,
|
||||||
Fn<void()> done,
|
Fn<void()> done,
|
||||||
Fn<void(const MTP::Error &error)> fail);
|
Fn<void()> fail);
|
||||||
void sendVotes(
|
void sendVotes(
|
||||||
FullMsgId itemId,
|
FullMsgId itemId,
|
||||||
const std::vector<QByteArray> &options);
|
const std::vector<QByteArray> &options);
|
||||||
|
|
|
@ -1064,7 +1064,7 @@ void PeerMenuCreatePoll(
|
||||||
const auto api = &peer->session().api();
|
const auto api = &peer->session().api();
|
||||||
api->polls().create(result.poll, action, crl::guard(weak, [=] {
|
api->polls().create(result.poll, action, crl::guard(weak, [=] {
|
||||||
weak->closeBox();
|
weak->closeBox();
|
||||||
}), crl::guard(weak, [=](const MTP::Error &error) {
|
}), crl::guard(weak, [=] {
|
||||||
*lock = false;
|
*lock = false;
|
||||||
weak->submitFailed(tr::lng_attach_failed(tr::now));
|
weak->submitFailed(tr::lng_attach_failed(tr::now));
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Add table
Reference in a new issue