Skip to content

Commit

Permalink
Don't re-populate a timeline's EventCache upon every new message
Browse files Browse the repository at this point in the history
If we do this (which there is no reason to currently do), then it
should only be done once upon discovering a new room.
  • Loading branch information
kevinaboos committed Sep 25, 2024
1 parent c9f56eb commit fde5d29
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/sliding_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit fde5d29

Please sign in to comment.