Skip to content

Commit

Permalink
Enable room history to be shown immediately upon first opening a room
Browse files Browse the repository at this point in the history
Move the logic for processing background timeline updates to a
separate function, such that we can run that procedure the very first time
a room is opened. If any updates were processed, we immediately redraw
the timeline, which removes all visible latency that previously existed,
as previously, a timeline wouldn't be redrawn until the first pagination
response was received.

There is one exception to this, which is when a timeline is cleared.
It still gets drawn properly, but since it's been cleared, there is nothing
that actually gets drawn.
This problem requires a completely separate solution, e.g., not actually
setting the existing `TimelineUiState::items` field to the `new_items` vector
from the TimelineUpdate until another (or several more) pagination responses
have been received and the timeline has been sufficiently backfilled.
  • Loading branch information
kevinaboos committed Oct 2, 2024
1 parent 606449f commit 08240fb
Show file tree
Hide file tree
Showing 2 changed files with 169 additions and 152 deletions.
Loading

0 comments on commit 08240fb

Please sign in to comment.