Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some WASM-related refactors #4491

Merged
merged 3 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions crates/matrix-sdk-ui/src/timeline/futures.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::future::IntoFuture;

use eyeball::{SharedObservable, Subscriber};
use eyeball::SharedObservable;
use matrix_sdk::{attachment::AttachmentConfig, TransmissionProgress};
use matrix_sdk_base::boxed_into_future;
use mime::Mime;
Expand Down Expand Up @@ -48,10 +48,9 @@ impl<'a> SendAttachment<'a> {
Self { use_send_queue: true, ..self }
}

/// Get a subscriber to observe the progress of sending the request
/// body.
/// Get a subscriber to observe the progress of sending the request body.
#[cfg(not(target_arch = "wasm32"))]
pub fn subscribe_to_send_progress(&self) -> Subscriber<TransmissionProgress> {
pub fn subscribe_to_send_progress(&self) -> eyeball::Subscriber<TransmissionProgress> {
self.send_progress.subscribe()
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/matrix-sdk-ui/src/timeline/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl RoomExt for Room {
}

pub(super) trait RoomDataProvider:
Clone + Send + Sync + 'static + PaginableRoom + PinnedEventsRoom
Clone + PaginableRoom + PinnedEventsRoom + 'static
{
fn own_user_id(&self) -> &UserId;
fn room_version(&self) -> RoomVersionId;
Expand Down
7 changes: 1 addition & 6 deletions crates/matrix-sdk/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,9 @@ use std::{
};

use eyeball::{SharedObservable, Subscriber};
#[cfg(not(target_arch = "wasm32"))]
use eyeball_im::VectorDiff;
use eyeball_im::{Vector, VectorDiff};
use futures_core::Stream;
#[cfg(not(target_arch = "wasm32"))]
use futures_util::StreamExt;
#[cfg(not(target_arch = "wasm32"))]
use imbl::Vector;
#[cfg(feature = "e2e-encryption")]
use matrix_sdk_base::crypto::store::LockableCryptoStore;
use matrix_sdk_base::{
Expand Down Expand Up @@ -1098,7 +1094,6 @@ impl Client {
}

/// Get a stream of all the rooms, in addition to the existing rooms.
#[cfg(not(target_arch = "wasm32"))]
pub fn rooms_stream(&self) -> (Vector<Room>, impl Stream<Item = Vec<VectorDiff<Room>>> + '_) {
let (rooms, stream) = self.base_client().rooms_stream();

Expand Down
Loading