2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Improve separate window support.

This commit is contained in:
John Preston
2025-05-30 18:33:47 +04:00
parent 50b761fab2
commit 6068678fa1
7 changed files with 31 additions and 29 deletions

View File

@@ -1176,9 +1176,11 @@ Window::SessionController *Manager::openNotificationMessage(
}
});
const auto separateId = topic
? Window::SeparateId(Window::SeparateType::Forum, history)
: Window::SeparateId(history->peer);
const auto separateId = !topic
? Window::SeparateId(history->peer)
: history->peer->asChannel()->useSubsectionTabs()
? Window::SeparateId(Window::SeparateType::Chat, topic)
: Window::SeparateId(Window::SeparateType::Forum, history);
const auto separate = Core::App().separateWindowFor(separateId);
const auto itemId = openExactlyMessage ? messageId : ShowAtUnreadMsgId;
if (openSeparated && !separate && !topic) {