Skip to content

Commit 4ca8d61

Browse files
committed
feat(ffi): expose set_sync_mode on the sliding sync list
Signed-off-by: Benjamin Bouvier <[email protected]>
1 parent 623ff6f commit 4ca8d61

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,16 @@ impl SlidingSyncList {
652652
pub fn unset_timeline_limit(&self) {
653653
self.inner.set_timeline_limit(None)
654654
}
655+
656+
/// Changes the sync mode, and automatically restarts the sliding sync
657+
/// internally.
658+
pub fn set_sync_mode(
659+
&self,
660+
builder: Arc<SlidingSyncSelectiveModeBuilder>,
661+
) -> Result<(), ClientError> {
662+
let builder = unwrap_or_clone_arc(builder);
663+
self.inner.set_sync_mode(builder.inner).map_err(Into::into)
664+
}
655665
}
656666

657667
pub trait SlidingSyncObserver: Sync + Send {

0 commit comments

Comments
 (0)