mirror of
https://github.com/youwen5/iamb.git
synced 2025-08-04 11:38:28 -07:00
Support automatically toggling room focus (#337)
This commit is contained in:
parent
84eaadc09a
commit
9ed9400b67
4 changed files with 203 additions and 17 deletions
|
@ -1766,6 +1766,13 @@ impl RoomFocus {
|
|||
pub fn is_msgbar(&self) -> bool {
|
||||
matches!(self, RoomFocus::MessageBar)
|
||||
}
|
||||
|
||||
pub fn toggle(&mut self) {
|
||||
*self = match self {
|
||||
RoomFocus::MessageBar => RoomFocus::Scrollback,
|
||||
RoomFocus::Scrollback => RoomFocus::MessageBar,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// Identifiers used to track where a mark was placed.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue