mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Add new phrases for reminders.
This commit is contained in:
@@ -409,6 +409,13 @@ void ShareBox::keyPressEvent(QKeyEvent *e) {
|
||||
}
|
||||
}
|
||||
|
||||
SendMenuType ShareBox::sendMenuType() const {
|
||||
const auto selected = _inner->selected();
|
||||
return (selected.size() == 1 && selected.front()->isSelf())
|
||||
? SendMenuType::Reminder
|
||||
: SendMenuType::Scheduled;
|
||||
}
|
||||
|
||||
void ShareBox::createButtons() {
|
||||
clearButtons();
|
||||
if (_hasSelected) {
|
||||
@@ -417,7 +424,7 @@ void ShareBox::createButtons() {
|
||||
});
|
||||
SetupSendMenu(
|
||||
send,
|
||||
[=] { return true; },
|
||||
[=] { return sendMenuType(); },
|
||||
[=] { submitSilent(); },
|
||||
[=] { submitScheduled(); });
|
||||
} else if (_copyCallback) {
|
||||
@@ -471,7 +478,7 @@ void ShareBox::submitSilent() {
|
||||
void ShareBox::submitScheduled() {
|
||||
const auto callback = [=](Api::SendOptions options) { submit(options); };
|
||||
Ui::show(
|
||||
HistoryView::PrepareScheduleBox(this, callback),
|
||||
HistoryView::PrepareScheduleBox(this, sendMenuType(), callback),
|
||||
LayerOption::KeepOther);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user