element-x-android
90529ca5 - Create focused on event timelines with `roomCoroutineScope` (#8006)

Commit
5 days ago
Create focused on event timelines with `roomCoroutineScope` (#8006) * Create focused on event timelines with `roomCoroutineScope` Closing a room while a focused on event timeline was being created had the side-effect of keeping that timeline alive: the session coroutine scope was used to open the new timeline, so it was never canceled, and the new timeline was stored in the `TimelineController.detachedTimelineFlow`, and was never closed/destroyed. * Make sure we reuse the same `TimelineController` for the whole `RoomScope` Previously, 2 different controllers were being created, and only 1 of them was correctly disposed of, making the one holding the actual focused-on-event timelines stay alive forever, preventing the room cache from ever being shrunk. * Ensure we close the 'main' thread timeline and any detached timelines in the `TimelineController` inside `ThreadedMessagesNode` While checking for stale event cache subscriptions, I found this timeline controller was keeping a few timelines alive, and those were still subscribed and preventing the automatic room cache shrinking mechanism.
Author
Parents
Loading