mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Add "Send when online" to the send button context menu.
This commit is contained in:
@@ -502,7 +502,8 @@ void ShareBox::showMenu(not_null<Ui::RpWidget*> parent) {
|
||||
_menu.get(),
|
||||
sendMenuType(),
|
||||
[=] { submitSilent(); },
|
||||
[=] { submitScheduled(); });
|
||||
[=] { submitScheduled(); },
|
||||
[=] { submitWhenOnline(); });
|
||||
const auto success = (result == SendMenu::FillMenuResult::Success);
|
||||
if (_descriptor.forwardOptions.show || success) {
|
||||
_menu->setForcedVerticalOrigin(Ui::PopupMenu::VerticalOrigin::Bottom);
|
||||
@@ -599,6 +600,10 @@ void ShareBox::submitScheduled() {
|
||||
Ui::LayerOption::KeepOther);
|
||||
}
|
||||
|
||||
void ShareBox::submitWhenOnline() {
|
||||
submit(Api::DefaultSendWhenOnlineOptions());
|
||||
}
|
||||
|
||||
void ShareBox::copyLink() {
|
||||
if (const auto onstack = _descriptor.copyCallback) {
|
||||
onstack();
|
||||
|
Reference in New Issue
Block a user