2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 23:25:15 +00:00

Moved code for send context menu to namespace.

This commit is contained in:
23rd
2020-08-10 15:22:54 +03:00
committed by John Preston
parent af9440db38
commit 14cda49db2
22 changed files with 119 additions and 93 deletions

View File

@@ -1087,7 +1087,7 @@ object_ptr<Ui::RpWidget> CreatePollBox::setupContent() {
Ui::show(
HistoryView::PrepareScheduleBox(
this,
SendMenuType::Scheduled,
SendMenu::Type::Scheduled,
send),
Ui::LayerOption::KeepOther);
};
@@ -1108,9 +1108,11 @@ object_ptr<Ui::RpWidget> CreatePollBox::setupContent() {
if (_sendType == Api::SendType::Normal) {
const auto sendMenuType = [=] {
collectError();
return *error ? SendMenuType::Disabled : SendMenuType::Scheduled;
return *error
? SendMenu::Type::Disabled
: SendMenu::Type::Scheduled;
};
SetupSendMenuAndShortcuts(
SendMenu::SetupMenuAndShortcuts(
submit.data(),
sendMenuType,
sendSilent,