diff --git a/crates/matrix-sdk-ui/src/timeline/builder.rs b/crates/matrix-sdk-ui/src/timeline/builder.rs index e4f172f424..c5f02b028e 100644 --- a/crates/matrix-sdk-ui/src/timeline/builder.rs +++ b/crates/matrix-sdk-ui/src/timeline/builder.rs @@ -280,6 +280,7 @@ impl TimelineBuilder { diffs, match origin { EventsOrigin::Sync => RemoteEventOrigin::Sync, + EventsOrigin::Pagination => RemoteEventOrigin::Pagination, } ).await; } diff --git a/crates/matrix-sdk/src/event_cache/mod.rs b/crates/matrix-sdk/src/event_cache/mod.rs index 05630e0829..e6c7da3853 100644 --- a/crates/matrix-sdk/src/event_cache/mod.rs +++ b/crates/matrix-sdk/src/event_cache/mod.rs @@ -570,6 +570,9 @@ pub enum RoomEventCacheUpdate { pub enum EventsOrigin { /// Events are coming from a sync. Sync, + + /// Events are coming from pagination. + Pagination, } #[cfg(test)] diff --git a/crates/matrix-sdk/src/event_cache/pagination.rs b/crates/matrix-sdk/src/event_cache/pagination.rs index 5d4d22d99a..4d13566664 100644 --- a/crates/matrix-sdk/src/event_cache/pagination.rs +++ b/crates/matrix-sdk/src/event_cache/pagination.rs @@ -235,7 +235,7 @@ impl RoomPagination { if !sync_timeline_events_diffs.is_empty() { let _ = self.inner.sender.send(RoomEventCacheUpdate::UpdateTimelineEvents { diffs: sync_timeline_events_diffs, - origin: EventsOrigin::Sync, + origin: EventsOrigin::Pagination, }); }