mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fixed empty context menu from space of sponsored messages.
This commit is contained in:
parent
24cf3984c8
commit
3895e6d958
1 changed files with 8 additions and 3 deletions
|
@ -2751,8 +2751,13 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
||||||
? link->copyToClipboardContextItemText()
|
? link->copyToClipboardContextItemText()
|
||||||
: QString();
|
: QString();
|
||||||
|
|
||||||
if (item && item->isSponsored()) {
|
const auto sponsored = (item && item->isSponsored())
|
||||||
FillSponsoredMessagesMenu(controller, item->fullId(), _menu);
|
? item
|
||||||
|
: (Element::Moused() && Element::Moused()->data()->isSponsored())
|
||||||
|
? Element::Moused()->data()
|
||||||
|
: nullptr;
|
||||||
|
if (sponsored) {
|
||||||
|
FillSponsoredMessagesMenu(controller, sponsored->fullId(), _menu);
|
||||||
}
|
}
|
||||||
if (isUponSelected > 0) {
|
if (isUponSelected > 0) {
|
||||||
addReplyAction(item);
|
addReplyAction(item);
|
||||||
|
@ -2860,7 +2865,7 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
||||||
HistoryView::CopyPostLink(controller, itemId, HistoryView::Context::History);
|
HistoryView::CopyPostLink(controller, itemId, HistoryView::Context::History);
|
||||||
}, &st::menuIconLink);
|
}, &st::menuIconLink);
|
||||||
}
|
}
|
||||||
if (item && item->isSponsored()) {
|
if (sponsored) {
|
||||||
if (!_menu->empty()) {
|
if (!_menu->empty()) {
|
||||||
_menu->addSeparator(&st::expandedMenuSeparator);
|
_menu->addSeparator(&st::expandedMenuSeparator);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue