2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-03 07:56:03 +00:00

Allow opening top peers in a new window.

This commit is contained in:
John Preston
2024-04-11 18:05:51 +04:00
parent 4cdd939028
commit 3dbadeb232
6 changed files with 35 additions and 16 deletions

View File

@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "dialogs/dialogs_widget.h"
#include "base/qt/qt_key_modifiers.h"
#include "base/options.h"
#include "dialogs/ui/dialogs_stories_content.h"
#include "dialogs/ui/dialogs_stories_list.h"
@@ -1123,7 +1124,12 @@ void Widget::updateSuggestions(anim::type animated) {
_suggestions->topPeerChosen(
) | rpl::start_with_next([=](PeerId id) {
controller()->showPeerHistory(id);
const auto peer = session().data().peer(id);
if (base::IsCtrlPressed()) {
controller()->showInNewWindow(peer);
} else {
controller()->showPeerHistory(peer);
}
}, _suggestions->lifetime());
_suggestions->show();