Skip to content

Commit 4e3c146

Browse files
committed
Fixed display of menu items from sponsored message with selected text.
1 parent 5bc9543 commit 4e3c146

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Telegram/SourceFiles/history/history_inner_widget.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2526,6 +2526,9 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
25262526
? link->copyToClipboardContextItemText()
25272527
: QString();
25282528

2529+
if (item->isSponsored()) {
2530+
FillSponsoredMessagesMenu(controller, item->fullId(), _menu);
2531+
}
25292532
if (isUponSelected > 0) {
25302533
addReplyAction(item);
25312534
const auto selectedText = getSelectedText();
@@ -2588,10 +2591,6 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
25882591
}, &st::menuIconCopy);
25892592
}
25902593
}
2591-
if (item->isSponsored()) {
2592-
const auto itemId = item->fullId();
2593-
FillSponsoredMessagesMenu(controller, itemId, _menu);
2594-
}
25952594
if (!item->isService() && view && actionText.isEmpty()) {
25962595
if (!hasCopyRestriction(item)
25972596
&& (view->hasVisibleText() || mediaHasTextForCopy)) {

0 commit comments

Comments
 (0)