Skip to content
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
4 changes: 2 additions & 2 deletions src/home/navigation_tab_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
use makepad_widgets::*;
use crate::{
avatar_cache::{self, AvatarCacheEntry}, login::login_screen::LoginAction, logout::logout_confirm_modal::LogoutAction, profile::{
user_profile::{AvatarState, UserProfile},
user_profile::UserProfile,
user_profile_cache::{self, UserProfileUpdate},
}, shared::{
avatar::AvatarWidgetExt,
avatar::{AvatarState, AvatarWidgetExt},
callout_tooltip::{CalloutTooltipOptions, TooltipAction, TooltipPosition},
styles::*,
verification_badge::VerificationBadgeWidgetExt,
Expand Down
4 changes: 2 additions & 2 deletions src/home/room_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ use ruma::{OwnedUserId, events::{AnySyncMessageLikeEvent, AnySyncTimelineEvent,

use crate::{
app::AppStateAction, avatar_cache, event_preview::{plaintext_body_of_timeline_item, text_preview_of_encrypted_message, text_preview_of_member_profile_change, text_preview_of_other_message_like, text_preview_of_other_state, text_preview_of_room_membership_change, text_preview_of_timeline_item}, home::{edited_indicator::EditedIndicatorWidgetRefExt, link_preview::{LinkPreviewCache, LinkPreviewRef, LinkPreviewWidgetRefExt}, loading_pane::{LoadingPaneState, LoadingPaneWidgetExt}, room_image_viewer::{get_image_name_and_filesize, populate_matrix_image_modal}, rooms_list::RoomsListRef, tombstone_footer::SuccessorRoomDetails}, media_cache::{MediaCache, MediaCacheEntry}, profile::{
user_profile::{AvatarState, ShowUserProfileAction, UserProfile, UserProfileAndRoomId, UserProfilePaneInfo, UserProfileSlidingPaneRef, UserProfileSlidingPaneWidgetExt},
user_profile::{ShowUserProfileAction, UserProfile, UserProfileAndRoomId, UserProfilePaneInfo, UserProfileSlidingPaneRef, UserProfileSlidingPaneWidgetExt},
user_profile_cache,
},
room::{BasicRoomDetails, room_input_bar::RoomInputBarState, typing_notice::TypingNoticeWidgetExt},
shared::{
avatar::AvatarWidgetRefExt, callout_tooltip::{CalloutTooltipOptions, TooltipAction, TooltipPosition}, confirmation_modal::ConfirmationModalContent, html_or_plaintext::{HtmlOrPlaintextRef, HtmlOrPlaintextWidgetRefExt, RobrixHtmlLinkAction}, image_viewer::{ImageViewerAction, ImageViewerMetaData, LoadState}, jump_to_bottom_button::{JumpToBottomButtonWidgetExt, UnreadMessageCount}, popup_list::{PopupItem, PopupKind, enqueue_popup_notification}, restore_status_view::RestoreStatusViewWidgetExt, styles::*, text_or_image::{TextOrImageAction, TextOrImageRef, TextOrImageWidgetRefExt}, timestamp::TimestampWidgetRefExt
avatar::{AvatarState, AvatarWidgetRefExt}, callout_tooltip::{CalloutTooltipOptions, TooltipAction, TooltipPosition}, confirmation_modal::ConfirmationModalContent, html_or_plaintext::{HtmlOrPlaintextRef, HtmlOrPlaintextWidgetRefExt, RobrixHtmlLinkAction}, image_viewer::{ImageViewerAction, ImageViewerMetaData, LoadState}, jump_to_bottom_button::{JumpToBottomButtonWidgetExt, UnreadMessageCount}, popup_list::{PopupItem, PopupKind, enqueue_popup_notification}, restore_status_view::RestoreStatusViewWidgetExt, styles::*, text_or_image::{TextOrImageAction, TextOrImageRef, TextOrImageWidgetRefExt}, timestamp::TimestampWidgetRefExt
},
sliding_sync::{BackwardsPaginateUntilEventRequest, MatrixRequest, PaginationDirection, TimelineEndpoints, TimelineRequestSender, UserPowerLevels, get_client, submit_async_request, take_timeline_endpoints}, utils::{self, ImageFormat, MEDIA_THUMBNAIL_FORMAT, RoomNameId, unix_time_millis_to_datetime}
};
Expand Down
20 changes: 19 additions & 1 deletion src/home/rooms_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ pub enum InviteState {

/// The value in the RoomsList's `space_map` that contains info about a space.
#[derive(Default)]
struct SpaceMapValue {
struct SpaceMapValue {
/// Whether this space is fully paginated, meaning that our client has obtained
/// the full list of direct children within this space.
///
Expand Down Expand Up @@ -1034,6 +1034,8 @@ impl RoomsList {
kind: PopupKind::Error,
});
}
// DetailedChildren is handled by SpaceLobbyScreen, not RoomsList.
SpaceRoomListAction::DetailedChildren { .. } => { }
}
}

Expand Down Expand Up @@ -1395,6 +1397,22 @@ impl RoomsListRef {
pub fn get_selected_space_id(&self) -> Option<OwnedRoomId> {
self.borrow()?.selected_space.as_ref().map(|ss| ss.room_id().clone())
}

/// Returns a clone of the space request sender channel, if available.
///
/// This allows other widgets to submit space-related requests directly
/// to the background space service.
pub fn get_space_request_sender(&self) -> Option<UnboundedSender<SpaceRequest>> {
self.borrow()?.space_request_sender.clone()
}

/// Returns the parent chain of the given space, if known.
pub fn get_space_parent_chain(&self, space_id: &OwnedRoomId) -> Option<ParentChain> {
self.borrow()?
.space_map
.get(space_id)
.map(|smv| smv.parent_chain.clone())
}
}

pub struct RoomsListScopeProps {
Expand Down
Loading