Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable room history to be shown immediately upon first opening a room
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