Skip to content

Commit 4282272

Browse files
committed
fix(spaces): use wasm compatible executor spawn and JoinHandle
1 parent 741859e commit 4282272

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
use eyeball::{SharedObservable, Subscriber};
2020
use futures_util::pin_mut;
2121
use matrix_sdk::Client;
22+
use matrix_sdk_common::executor::{JoinHandle, spawn};
2223
use ruma::OwnedRoomId;
23-
use tokio::task::JoinHandle;
2424
use tokio_stream::StreamExt;
2525
use tracing::error;
2626

@@ -53,7 +53,7 @@ impl SpaceService {
5353
let joined_spaces_clone = joined_spaces.clone();
5454
let all_room_updates_receiver = client.subscribe_to_all_room_updates();
5555

56-
let handle = tokio::spawn(async move {
56+
let handle = spawn(async move {
5757
pin_mut!(all_room_updates_receiver);
5858

5959
loop {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ use std::sync::Mutex;
1717
use eyeball::{SharedObservable, Subscriber};
1818
use futures_util::pin_mut;
1919
use matrix_sdk::{Client, Error, paginators::PaginationToken};
20+
use matrix_sdk_common::executor::{JoinHandle, spawn};
2021
use ruma::{OwnedRoomId, api::client::space::get_hierarchy};
21-
use tokio::task::JoinHandle;
2222
use tracing::error;
2323

2424
use crate::spaces::SpaceServiceRoom;
@@ -56,7 +56,7 @@ impl SpaceServiceRoomList {
5656
let rooms_clone = rooms.clone();
5757
let all_room_updates_receiver = client.subscribe_to_all_room_updates();
5858

59-
let handle = tokio::spawn(async move {
59+
let handle = spawn(async move {
6060
pin_mut!(all_room_updates_receiver);
6161

6262
loop {

0 commit comments

Comments
 (0)