Skip to content

Commit 71bbeb2

Browse files
committed
chore(ffi): expose sliding sync's expire_sessions method
1 parent c6a25e9 commit 71bbeb2

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

bindings/matrix-sdk-ffi/src/sync_service.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@ impl SyncService {
9090
}
9191
})))
9292
}
93+
94+
/// Force expiring both sliding sync sessions.
95+
///
96+
/// This ensures that the sync service is stopped before expiring both
97+
/// sessions. It should be used sparingly, as it will cause a restart of
98+
/// the sessions on the server as well.
99+
pub async fn expire_sessions(&self) {
100+
self.inner.expire_sessions().await;
101+
}
93102
}
94103

95104
#[derive(Clone, uniffi::Object)]

crates/matrix-sdk-ui/src/spaces/room_list.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ pub enum SpaceRoomListPaginationState {
7676
/// // spawn {
7777
/// while let Some(pagination_state) = pagination_state_stream.next().await {
7878
/// println!("Received pagination state update: {pagination_state:?}");
79-
/// };
79+
/// }
8080
/// // }
8181
///
8282
/// // spawn {
8383
/// while let Some(diffs) = room_stream.next().await {
8484
/// println!("Received room list update: {diffs:?}");
85-
/// };
85+
/// }
8686
/// // }
8787
///
8888
/// // Ask the room to load the next page

0 commit comments

Comments
 (0)