mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 23:55:12 +00:00
Open specific chat only in one window.
This commit is contained in:
@@ -319,7 +319,7 @@ void MainWindow::setupIntro(Intro::EnterPoint point) {
|
||||
fixOrder();
|
||||
}
|
||||
|
||||
void MainWindow::setupMain() {
|
||||
void MainWindow::setupMain(MsgId singlePeerShowAtMsgId) {
|
||||
Expects(account().sessionExists());
|
||||
|
||||
const auto animated = _intro
|
||||
@@ -338,7 +338,10 @@ void MainWindow::setupMain() {
|
||||
clearWidgets();
|
||||
_main = std::move(created);
|
||||
if (const auto peer = singlePeer()) {
|
||||
_main->controller()->showPeerHistory(peer);
|
||||
_main->controller()->showPeerHistory(
|
||||
peer,
|
||||
Window::SectionShow::Way::ClearStack,
|
||||
singlePeerShowAtMsgId);
|
||||
}
|
||||
if (_passcodeLock) {
|
||||
_main->hide();
|
||||
@@ -859,8 +862,8 @@ MainWindow::~MainWindow() {
|
||||
namespace App {
|
||||
|
||||
MainWindow *wnd() {
|
||||
return (Core::IsAppLaunched() && Core::App().activeWindow())
|
||||
? Core::App().activeWindow()->widget().get()
|
||||
return (Core::IsAppLaunched() && Core::App().primaryWindow())
|
||||
? Core::App().primaryWindow()->widget().get()
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user