2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 15:45:12 +00:00

Fix crash in topics disabling.

This commit is contained in:
John Preston
2023-01-21 09:42:57 +04:00
parent 37454b4ff4
commit 7caabb8f5a
8 changed files with 56 additions and 12 deletions

View File

@@ -1001,10 +1001,16 @@ void SessionController::showForum(
}
forum->destroyed(
) | rpl::start_with_next([=, history = forum->history()] {
const auto now = activeChatCurrent().owningHistory();
const auto showHistory = !now || (now == history);
closeForum();
showPeerHistory(
history,
{ anim::type::normal, anim::activation::background });
if (showHistory) {
showPeerHistory(history, {
SectionShow::Way::Backward,
anim::type::normal,
anim::activation::background,
});
}
}, _shownForumLifetime);
content()->showForum(forum, params);
}