Skip to content

Commit

Permalink
feat(ui+ffi): Add various features to RoomList
Browse files Browse the repository at this point in the history
feat(ui+ffi): Add various features to `RoomList`
  • Loading branch information
Hywan authored Jun 14, 2023
2 parents f55c102 + 1519931 commit 2c87180
Show file tree
Hide file tree
Showing 5 changed files with 448 additions and 383 deletions.
6 changes: 5 additions & 1 deletion bindings/matrix-sdk-ffi/src/room_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use futures_util::{pin_mut, StreamExt};
use ruma::RoomId;

use crate::{
Client, EventTimelineItem, RoomListEntry, TaskHandle, TimelineDiff, TimelineItem,
Client, EventTimelineItem, Room, RoomListEntry, TaskHandle, TimelineDiff, TimelineItem,
TimelineListener, RUNTIME,
};

Expand Down Expand Up @@ -198,6 +198,10 @@ impl RoomListItem {
RUNTIME.block_on(async { self.inner.name().await })
}

fn full_room(&self) -> Arc<Room> {
Arc::new(Room::new(self.inner.inner_room().clone()))
}

async fn timeline(&self, listener: Box<dyn TimelineListener>) -> RoomListItemTimelineResult {
let timeline = self.inner.timeline().await;
let (items, items_stream) = timeline.subscribe().await;
Expand Down
Loading

0 comments on commit 2c87180

Please sign in to comment.