Skip to content

Commit e3ca7d1

Browse files
committed
Use a wasm compatible executor spawn
1 parent 318b8b0 commit e3ca7d1

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,7 +19,7 @@
1919
use eyeball::{SharedObservable, Subscriber};
2020
use futures_util::pin_mut;
2121
use matrix_sdk::Client;
22-
use matrix_sdk_common::executor::JoinHandle;
22+
use matrix_sdk_common::executor::{JoinHandle, spawn};
2323
use ruma::OwnedRoomId;
2424
use tokio_stream::StreamExt;
2525
use tracing::error;
@@ -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,7 +17,7 @@ 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;
20+
use matrix_sdk_common::executor::{JoinHandle, spawn};
2121
use ruma::{OwnedRoomId, api::client::space::get_hierarchy};
2222
use tracing::error;
2323

@@ -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)