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

Allow to schedule created polls.

This commit is contained in:
John Preston
2019-08-20 16:21:10 +03:00
parent 8eac2dcb78
commit ef7087348a
17 changed files with 243 additions and 115 deletions

View File

@@ -415,7 +415,7 @@ void ShareBox::createButtons() {
const auto send = addButton(tr::lng_share_confirm(), [=] {
submit({});
});
SetupSendWithoutSound(
SetupSendMenu(
send,
[=] { return true; },
[=] { submitSilent(); },
@@ -469,14 +469,9 @@ void ShareBox::submitSilent() {
}
void ShareBox::submitScheduled() {
const auto callback = crl::guard(this, [=](Api::SendOptions options) {
submit(options);
});
const auto callback = [=](Api::SendOptions options) { submit(options); };
Ui::show(
Box(
HistoryView::ScheduleBox,
callback,
HistoryView::DefaultScheduleTime()),
HistoryView::PrepareScheduleBox(this, callback),
LayerOption::KeepOther);
}