diff --git a/crates/matrix-sdk/src/event_cache/room/mod.rs b/crates/matrix-sdk/src/event_cache/room/mod.rs index 21c818f59b..21e6223d9d 100644 --- a/crates/matrix-sdk/src/event_cache/room/mod.rs +++ b/crates/matrix-sdk/src/event_cache/room/mod.rs @@ -135,7 +135,7 @@ impl RoomEventCache { /// storage. pub async fn clear(&self) -> Result<()> { // Clear the linked chunk and persisted storage. - self.inner.state.write().await.clear().await?; + self.inner.state.write().await.reset().await?; // Clear the (temporary) events mappings. self.inner.all_events.write().await.clear(); @@ -723,14 +723,6 @@ mod private { Ok(Self { room, store, events, waited_for_initial_prev_token: false }) } - /// Clear all cached content for this [`RoomEventCacheState`]. - pub async fn clear(&mut self) -> Result<(), EventCacheError> { - self.events.reset(); - self.propagate_changes().await?; - self.waited_for_initial_prev_token = false; - Ok(()) - } - /// Removes the bundled relations from an event, if they were present. /// /// Only replaces the present if it contained bundled relations.