Support adding rooms to spaces (#407)

This commit is contained in:
VAWVAW 2025-05-15 03:26:35 +00:00 committed by GitHub
parent 7dd09e32a8
commit 3e45ca3d2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 366 additions and 5 deletions

View file

@ -76,6 +76,7 @@ use crate::base::{
SortFieldRoom,
SortFieldUser,
SortOrder,
SpaceAction,
UnreadInfo,
};
@ -360,6 +361,19 @@ impl IambWindow {
}
}
pub async fn space_command(
&mut self,
act: SpaceAction,
ctx: ProgramContext,
store: &mut ProgramStore,
) -> IambResult<EditInfo> {
if let IambWindow::Room(w) = self {
w.space_command(act, ctx, store).await
} else {
return Err(IambError::NoSelectedRoom.into());
}
}
pub async fn room_command(
&mut self,
act: RoomAction,