Support adding rooms to spaces (#407)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user