mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
Remove unneeded separator from context menu.
This commit is contained in:
parent
99c5d994b5
commit
e1b33fbc40
2 changed files with 3 additions and 6 deletions
|
@ -2902,9 +2902,6 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
|||
HistoryView::EmojiPacksSource::Message,
|
||||
_controller);
|
||||
const auto added = (_menu->actions().size() > wasAmount);
|
||||
if (!added && !_menu->empty()) {
|
||||
_menu->addSeparator();
|
||||
}
|
||||
HistoryView::AddSelectRestrictionAction(
|
||||
_menu,
|
||||
textItem ? textItem : _dragStateItem,
|
||||
|
|
|
@ -1280,9 +1280,6 @@ base::unique_qptr<Ui::PopupMenu> FillContextMenu(
|
|||
}
|
||||
if (item) {
|
||||
const auto added = (result->actions().size() > wasAmount);
|
||||
if (!added) {
|
||||
result->addSeparator();
|
||||
}
|
||||
AddSelectRestrictionAction(result, item, !added);
|
||||
}
|
||||
if (hasWhoReactedItem) {
|
||||
|
@ -1885,6 +1882,9 @@ void AddSelectRestrictionAction(
|
|||
|| item->isSponsored()) {
|
||||
return;
|
||||
}
|
||||
if (addIcon && !menu->empty()) {
|
||||
menu->addSeparator();
|
||||
}
|
||||
auto button = base::make_unique_q<Ui::Menu::MultilineAction>(
|
||||
menu->menu(),
|
||||
menu->st().menu,
|
||||
|
|
Loading…
Add table
Reference in a new issue