From 54fc0f38ea0b8b492353f40ace0459464fd69d55 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Wed, 21 Jun 2023 11:54:51 +0200 Subject: [PATCH] feat(ui): `RoomList::sync` no longer returns a `TaskHandle`. Because there is `RoomList::stop_sync` now, which is better than dealing with the `TaskHandle`. --- bindings/matrix-sdk-ffi/src/room_list.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/matrix-sdk-ffi/src/room_list.rs b/bindings/matrix-sdk-ffi/src/room_list.rs index 0715a399d..13d0be762 100644 --- a/bindings/matrix-sdk-ffi/src/room_list.rs +++ b/bindings/matrix-sdk-ffi/src/room_list.rs @@ -87,17 +87,17 @@ pub struct RoomList { #[uniffi::export] impl RoomList { - fn sync(&self) -> Arc { + fn sync(&self) { let this = self.inner.clone(); - Arc::new(TaskHandle::new(RUNTIME.spawn(async move { + RUNTIME.spawn(async move { let sync_stream = this.sync(); pin_mut!(sync_stream); while sync_stream.next().await.is_some() { // keep going! } - }))) + }); } fn stop_sync(&self) -> Result<(), RoomListError> {