Support automatically toggling room focus (#337)

This commit is contained in:
Ulyssa 2025-05-31 09:29:49 -07:00 committed by GitHub
parent 84eaadc09a
commit 9ed9400b67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 203 additions and 17 deletions

View file

@ -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.