From fde5d29711363f49fdc3503125a90522bffac677 Mon Sep 17 00:00:00 2001 From: Kevin Boos Date: Wed, 25 Sep 2024 13:27:19 -0700 Subject: [PATCH] Don't re-populate a timeline's EventCache upon every new message If we do this (which there is no reason to currently do), then it should only be done once upon discovering a new room. --- src/sliding_sync.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/sliding_sync.rs b/src/sliding_sync.rs index cd130637..6153a7f6 100644 --- a/src/sliding_sync.rs +++ b/src/sliding_sync.rs @@ -895,16 +895,6 @@ async fn async_main_loop() -> Result<()> { continue; }; - // TODO: when the event cache handles its own cache, we can remove this. - client - .event_cache() - .add_initial_events( - &room_id, - ssroom.timeline_queue().iter().cloned().collect(), - ssroom.prev_batch(), - ) - .await?; - let timeline = Timeline::builder(&room) .track_read_marker_and_receipts() .build()