mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-16 03:55:42 -04:00
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:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user