feat(ui): RoomList::sync no longer returns a TaskHandle.

Because there is `RoomList::stop_sync` now, which is better than dealing
with the `TaskHandle`.
This commit is contained in:
Ivan Enderlin
2023-06-21 11:54:51 +02:00
parent fe0b458403
commit 54fc0f38ea

View File

@@ -87,17 +87,17 @@ pub struct RoomList {
#[uniffi::export]
impl RoomList {
fn sync(&self) -> Arc<TaskHandle> {
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> {