Skip to content

Commit

Permalink
fix(ffi): Update according to last commits.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hywan committed Aug 30, 2023
1 parent 301d8fd commit 1b8cf7f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions bindings/matrix-sdk-ffi/src/room.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ use crate::{
room_member::{MessageLikeEventType, RoomMember, StateEventType},
timeline::{
AudioInfo, EventTimelineItem, FileInfo, ImageInfo, PollKind, ThumbnailInfo, TimelineDiff,
TimelineItem, TimelineListener, VideoInfo,
TimelineListener, VideoInfo,
},
TaskHandle,
};
Expand Down Expand Up @@ -253,7 +253,7 @@ impl Room {
})
.clone();

let (timeline_items, timeline_stream) = timeline.subscribe_batched().await;
let timeline_stream = timeline.subscribe_batched();
let timeline_stream = TaskHandle::new(RUNTIME.spawn(async move {
pin_mut!(timeline_stream);

Expand All @@ -263,10 +263,7 @@ impl Room {
}
}));

RoomTimelineListenerResult {
items: timeline_items.into_iter().map(TimelineItem::from_arc).collect(),
items_stream: Arc::new(timeline_stream),
}
RoomTimelineListenerResult { items_stream: Arc::new(timeline_stream) }
}

pub async fn room_info(&self) -> Result<RoomInfo, ClientError> {
Expand Down Expand Up @@ -1091,7 +1088,6 @@ impl SendAttachmentJoinHandle {

#[derive(uniffi::Record)]
pub struct RoomTimelineListenerResult {
pub items: Vec<Arc<TimelineItem>>,
pub items_stream: Arc<TaskHandle>,
}

Expand Down

0 comments on commit 1b8cf7f

Please sign in to comment.