mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-03 08:05:12 +00:00
Add "Open in new window" to context menu.
This commit is contained in:
@@ -484,24 +484,8 @@ void Widget::chosenRow(const ChosenRow &row) {
|
||||
const auto showAtMsgId = controller()->uniqueChatsInSearchResults()
|
||||
? ShowAtUnreadMsgId
|
||||
: row.message.fullId.msg;
|
||||
if (row.newWindow && controller()->canShowSeparateWindow(peer)) {
|
||||
const auto active = controller()->activeChatCurrent();
|
||||
const auto fromActive = active.history()
|
||||
? (active.history()->peer == peer)
|
||||
: false;
|
||||
const auto toSeparate = [=] {
|
||||
Core::App().ensureSeparateWindowForPeer(
|
||||
peer,
|
||||
showAtMsgId);
|
||||
};
|
||||
if (fromActive) {
|
||||
controller()->window().preventOrInvoke([=] {
|
||||
controller()->clearSectionStack();
|
||||
toSeparate();
|
||||
});
|
||||
} else {
|
||||
toSeparate();
|
||||
}
|
||||
if (row.newWindow) {
|
||||
controller()->showInNewWindow(peer, showAtMsgId);
|
||||
} else {
|
||||
controller()->showThread(
|
||||
history,
|
||||
|
Reference in New Issue
Block a user