-
Notifications
You must be signed in to change notification settings - Fork 382
Open
Labels
Description
The new PinnedEventCache introduced recently is spawned lazily. It will spawn a task in the background as well, that will be correctly aborted when the parent container struct is dropped. However, there's nothing signaling, at the moment, that all pinned Timelines are dead, and that the PinnedEventCache could be unloaded (i.e. the task could be aborted), resulting in unnecessary background processing, after an app has switched the view away from the pinned events timeline.
- We could likely reuse and generalize the mechanism introduced for the unthreaded room timeline (née
RoomEventCacheSubscriber, which name would have to be generalized). - Alternatively, we could also just count pinned timelines as observers of the main room timeline — which make sense, since a pinned event timeline requires the unthreaded timeline to be alive and updated over time. Then, when the
RoomEventCacheSubscriberdrops, we could also unload thePinnedEventCache. - (other million dollars idea goes here)
Reactions are currently unavailable