Put the "N Seen" context menu item always first.
This commit is contained in:
parent
ead695b101
commit
e220447bdd
|
@ -1615,16 +1615,6 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto itemId = item->fullId();
|
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) {
|
if (canSendMessages) {
|
||||||
_menu->addAction(tr::lng_context_reply_msg(tr::now), [=] {
|
_menu->addAction(tr::lng_context_reply_msg(tr::now), [=] {
|
||||||
_widget->replyToMessage(itemId);
|
_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();
|
const auto link = ClickHandler::getActive();
|
||||||
auto lnkPhoto = dynamic_cast<PhotoClickHandler*>(link.get());
|
auto lnkPhoto = dynamic_cast<PhotoClickHandler*>(link.get());
|
||||||
auto lnkDocument = dynamic_cast<DocumentClickHandler*>(link.get());
|
auto lnkDocument = dynamic_cast<DocumentClickHandler*>(link.get());
|
||||||
|
|
Loading…
Reference in New Issue