Support displaying and editing room descriptions (#12)

This commit is contained in:
Ulyssa 2023-01-05 18:12:25 -08:00
parent 8ed037afca
commit 38f4795886
No known key found for this signature in database
GPG key ID: 1B3965A3D18B9B64
13 changed files with 286 additions and 55 deletions

View file

@ -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(),