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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user