fix(ui): Pass the correct RemoteEventOrigin to replace_with_initial_remote_events.

This patch updates the `RemoteEventOrigin` value passed to
`TimelineController::replace_with_initial_remote_events` when there is
a lag with the event cache. The previous value was `Sync`, but it should
be `Cache` since these events come from the event _cache_ (it was in the
name, easy).
This commit is contained in:
Ivan Enderlin committed 2025-03-13 09:23:24 +01:00
1 parent 5aae0cbcd9
commit 07c7b6ab2a
1 file changed
+1 -4
+1 -4
View File
@@ -244,15 +244,12 @@ impl TimelineBuilder {
// The updates might have lagged, but the room event cache might have
// events, so retrieve them and add them back again to the timeline,
// after clearing it.
//
// If we can't get a handle on the room cache's events, just clear the
// current timeline.
let (initial_events, _stream) = room_event_cache.subscribe().await;
inner
.replace_with_initial_remote_events(
initial_events.into_iter(),
RemoteEventOrigin::Sync,
RemoteEventOrigin::Cache,
)
.await;