2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 07:05:13 +00:00

Handle forum-non_forum changes in realtime.

This commit is contained in:
John Preston
2022-10-12 16:57:17 +04:00
parent 04d06e5b12
commit 6695eda1be
35 changed files with 286 additions and 499 deletions

View File

@@ -893,12 +893,8 @@ void SessionController::openForum(
closeFolder();
_openedForum = forum.get();
if (_openedForum.current() == forum) {
forum->flagsValue(
) | rpl::filter([=](const ChannelData::Flags::Change &update) {
using Flag = ChannelData::Flag;
return (update.diff & Flag::Forum)
&& !(update.value & Flag::Forum);
}) | rpl::start_with_next([=] {
forum->forum()->destroyed(
) | rpl::start_with_next([=] {
closeForum();
showPeerHistory(
forum,