Skip to content

Commit 61aa04f

Browse files
committed
feat(sdk): Send updates when RoomEventCacheStateLock is reloaded.
This patch updates the reloading of `RoomEventCacheStateLock` when the cross-process lock over the store is dirty to broadcast `RoomEventCacheUpdate` and `RoomEventCacheGenericUpdate`. That way the `Timeline` and other components can react to this reload.
1 parent 7a163c1 commit 61aa04f

File tree

2 files changed

+315
-16
lines changed

2 files changed

+315
-16
lines changed

crates/matrix-sdk/src/event_cache/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,10 +1048,14 @@ impl EventCacheInner {
10481048
ThreadingSupport::Enabled { .. }
10491049
);
10501050

1051+
let update_sender = Sender::new(32);
1052+
10511053
let room_state = RoomEventCacheStateLock::new(
10521054
room_id.to_owned(),
10531055
room_version_rules,
10541056
enabled_thread_support,
1057+
update_sender.clone(),
1058+
self.generic_update_sender.clone(),
10551059
self.linked_chunk_update_sender.clone(),
10561060
self.store.clone(),
10571061
pagination_status.clone(),
@@ -1074,6 +1078,7 @@ impl EventCacheInner {
10741078
pagination_status,
10751079
room_id.to_owned(),
10761080
auto_shrink_sender,
1081+
update_sender,
10771082
self.generic_update_sender.clone(),
10781083
);
10791084

0 commit comments

Comments
 (0)