Open kevinaboos opened 1 month ago
We also likely need to track the focus status of the timeline's PortalList:
Live
focus mode
PortalList
tracks this with its at_end
state.Focused
modeThe TimelineBuilder::with_focus()
method implies you can change the mode of an existing Timeline
, but I cannot actually find any methods that make this possible, even internal ones within the matrix-sdk....
Based on discussions with Rik, the PortalList::scroll_position
(the first_scroll
field) is not necessarily the correct way to determine what offset a given item in the PortalList is currently scrolled to.
Instead, we should:
In progress, see #134
Currently, we maintain timeline view stability for live backwards pagination. This is realized by using the timeline diffs to figure out which offset we need to apply to the event indices.
However, this will not work for cases where the ignore user list changes, as that results in the entire timeline being cleared, so there is no offset to calculate from the timeline diffs.
One possible way to implement this is to save the unique ID of one (or more) event(s) that are currently being shown on each timeline, such that we can return the timeline to that point once the full re-pagination has completed. We may also want to store the "focused" state of the timeline -- whether it was focused on that event or in "live" mode (scrolled to the very bottom or very top).
Spun off from a commit comment in #102.