mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-16 20:49:05 -04:00
fix(ui): SlidingSync::subscribe_to_room marks room as having missing members.
Fix https://github.com/matrix-org/matrix-rust-sdk/issues/2004.
This commit is contained in:
@@ -146,6 +146,11 @@ impl Room {
|
||||
self.inner.read().unwrap().members_synced
|
||||
}
|
||||
|
||||
/// Mark this Room is still missing member information.
|
||||
pub fn mark_members_missing(&self) {
|
||||
self.inner.write().unwrap().mark_members_missing()
|
||||
}
|
||||
|
||||
/// Check if the room states have been synced
|
||||
///
|
||||
/// States might be missing if we have only seen the room_id of this Room
|
||||
@@ -680,7 +685,7 @@ impl RoomInfo {
|
||||
self.members_synced = true;
|
||||
}
|
||||
|
||||
/// Mark this Room still missing member information.
|
||||
/// Mark this Room is still missing member information.
|
||||
pub fn mark_members_missing(&mut self) {
|
||||
self.members_synced = false;
|
||||
}
|
||||
|
||||
@@ -134,7 +134,14 @@ impl SlidingSync {
|
||||
}
|
||||
|
||||
/// Subscribe to a given room.
|
||||
///
|
||||
/// If the associated [`Room`] exists, it will be marked as members are
|
||||
/// missing, so that it ensures to re-fetch all members.
|
||||
pub fn subscribe_to_room(&self, room_id: OwnedRoomId, settings: Option<v4::RoomSubscription>) {
|
||||
if let Some(room) = self.inner.client.get_room(&room_id) {
|
||||
room.mark_members_missing();
|
||||
}
|
||||
|
||||
self.inner
|
||||
.sticky
|
||||
.write()
|
||||
|
||||
Reference in New Issue
Block a user