Fix crash in opening topics in a new window.

This commit is contained in:
John Preston 2024-07-01 09:07:45 +04:00
parent 36f6917bd3
commit 9ef74c510c

View file

@ -689,8 +689,9 @@ void Filler::addNewWindow() {
_addAction(tr::lng_context_new_window(tr::now), [=] {
Ui::PreventDelayedActivation();
if (const auto strong = weak.get()) {
const auto forum = !strong->asTopic() && peer->isForum();
controller->showInNewWindow(SeparateId(
peer->isForum() ? SeparateType::Forum : SeparateType::Chat,
forum ? SeparateType::Forum : SeparateType::Chat,
strong));
}
}, &st::menuIconNewWindow);