mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 13:49:52 -07:00
Support displaying and editing room descriptions (#12)
This commit is contained in:
parent
8ed037afca
commit
38f4795886
13 changed files with 286 additions and 55 deletions
|
@ -44,6 +44,7 @@ use super::scrollback::{Scrollback, ScrollbackState};
|
|||
|
||||
pub struct ChatState {
|
||||
room_id: OwnedRoomId,
|
||||
room: MatrixRoom,
|
||||
|
||||
tbox: TextBoxState<IambInfo>,
|
||||
sent: HistoryList<EditRope>,
|
||||
|
@ -63,6 +64,7 @@ impl ChatState {
|
|||
|
||||
ChatState {
|
||||
room_id,
|
||||
room,
|
||||
|
||||
tbox,
|
||||
sent: HistoryList::new(EditRope::from(""), 100),
|
||||
|
@ -80,6 +82,10 @@ impl ChatState {
|
|||
};
|
||||
}
|
||||
|
||||
pub fn room(&self) -> &MatrixRoom {
|
||||
&self.room
|
||||
}
|
||||
|
||||
pub fn id(&self) -> &RoomId {
|
||||
&self.room_id
|
||||
}
|
||||
|
@ -133,6 +139,7 @@ impl WindowOps<IambInfo> for ChatState {
|
|||
|
||||
ChatState {
|
||||
room_id: self.room_id.clone(),
|
||||
room: self.room.clone(),
|
||||
|
||||
tbox,
|
||||
sent: self.sent.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue