2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Added ability to pass SendMenuType to TabbedSelector.

This commit is contained in:
23rd
2020-07-25 19:50:19 +03:00
committed by John Preston
parent 7db9843543
commit 43056107fd
7 changed files with 36 additions and 10 deletions

View File

@@ -347,7 +347,9 @@ void GifsListWidget::mousePressEvent(QMouseEvent *e) {
_previewTimer.callOnce(QApplication::startDragTime());
}
void GifsListWidget::fillContextMenu(not_null<Ui::PopupMenu*> menu) {
void GifsListWidget::fillContextMenu(
not_null<Ui::PopupMenu*> menu,
SendMenuType type) {
if (_selected < 0 || _pressed >= 0) {
return;
}
@@ -362,13 +364,13 @@ void GifsListWidget::fillContextMenu(not_null<Ui::PopupMenu*> menu) {
Ui::show(
HistoryView::PrepareScheduleBox(
this,
SendMenuType::Scheduled,
type,
[=](Api::SendOptions options) { send(options); }),
Ui::LayerOption::KeepOther);
};
FillSendMenu(
menu,
[] { return SendMenuType::Scheduled; },
[&] { return type; },
silent,
schedule);
}