Skip to content

Commit

Permalink
refactor(sdk): Rename two variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hywan committed Dec 20, 2024
1 parent 0466742 commit c3094bb
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions crates/matrix-sdk/src/event_cache/room/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -561,11 +561,15 @@ impl RoomEventCacheInner {
})
.await?;

let mut cache = self.all_events.write().await;
for ev in &sync_timeline_events {
if let Some(event_id) = ev.event_id() {
self.append_related_event(&mut cache, ev);
cache.events.insert(event_id.to_owned(), (self.room_id.clone(), ev.clone()));
let mut all_events = self.all_events.write().await;

for sync_timeline_event in &sync_timeline_events {
if let Some(event_id) = sync_timeline_event.event_id() {
self.append_related_event(&mut all_events, sync_timeline_event);
all_events.events.insert(
event_id.to_owned(),
(self.room_id.clone(), sync_timeline_event.clone()),
);
}
}

Expand Down

0 comments on commit c3094bb

Please sign in to comment.