mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-08-07 05:22:31 -04:00
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:
1 parent
5aae0cbcd9
commit
07c7b6ab2a
1 file changed
+1
-4
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user