From e220447bdd3df3cea007a603d1ae603770650665 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 30 Sep 2021 15:36:14 +0400 Subject: [PATCH] Put the "N Seen" context menu item always first. --- .../history/history_inner_widget.cpp | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index 4e30473046..bcf22db8ab 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -1615,16 +1615,6 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { return; } const auto itemId = item->fullId(); - if (hasWhoReadItem) { - const auto participantChosen = [=](uint64 id) { - controller->showPeerInfo(PeerId(id)); - }; - _menu->addAction(Ui::WhoReadContextAction( - _menu.get(), - Api::WhoRead(_dragStateItem, this, st::defaultWhoRead), - participantChosen)); - _menu->addSeparator(); - } if (canSendMessages) { _menu->addAction(tr::lng_context_reply_msg(tr::now), [=] { _widget->replyToMessage(itemId); @@ -1733,6 +1723,18 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { }); } }; + + if (hasWhoReadItem) { + const auto participantChosen = [=](uint64 id) { + controller->showPeerInfo(PeerId(id)); + }; + _menu->addAction(Ui::WhoReadContextAction( + _menu.get(), + Api::WhoRead(_dragStateItem, this, st::defaultWhoRead), + participantChosen)); + _menu->addSeparator(); + } + const auto link = ClickHandler::getActive(); auto lnkPhoto = dynamic_cast(link.get()); auto lnkDocument = dynamic_cast(link.get());