mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Fixed display of bulk download menu item on restricted content.
This commit is contained in:
parent
4fd68d97d5
commit
ded570a480
2 changed files with 5 additions and 3 deletions
|
@ -2374,7 +2374,7 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
|||
_widget->confirmDeleteSelected();
|
||||
}, &st::menuIconDelete);
|
||||
}
|
||||
if (selectedState.count > 0) {
|
||||
if (selectedState.count > 0 && !hasCopyRestrictionForSelected()) {
|
||||
Menu::AddDownloadFilesAction(_menu, controller, _selected, this);
|
||||
}
|
||||
_menu->addAction(tr::lng_context_clear_selection(tr::now), [=] {
|
||||
|
@ -2572,7 +2572,7 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
|||
_widget->confirmDeleteSelected();
|
||||
}, &st::menuIconDelete);
|
||||
}
|
||||
if (selectedState.count > 0) {
|
||||
if (selectedState.count > 0 && !hasCopyRestrictionForSelected()) {
|
||||
Menu::AddDownloadFilesAction(_menu, controller, _selected, this);
|
||||
}
|
||||
_menu->addAction(tr::lng_context_clear_selection(tr::now), [=] {
|
||||
|
|
|
@ -830,7 +830,9 @@ void AddDownloadFilesAction(
|
|||
not_null<Ui::PopupMenu*> menu,
|
||||
const ContextMenuRequest &request,
|
||||
not_null<ListWidget*> list) {
|
||||
if (!request.overSelection || request.selectedItems.empty()) {
|
||||
if (!request.overSelection
|
||||
|| request.selectedItems.empty()
|
||||
|| list->hasCopyRestrictionForSelected()) {
|
||||
return;
|
||||
}
|
||||
Menu::AddDownloadFilesAction(
|
||||
|
|
Loading…
Add table
Reference in a new issue