Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,10 @@ impl App {
pub struct AppState {
/// The currently-selected room, which is highlighted (selected) in the RoomsList
/// and considered "active" in the main rooms screen.
#[serde(default, deserialize_with = "crate::utils::deserialize_or_default")]
///
/// This isn't persisted because in mobile view mode, the rooms list shows no selection,
/// and in desktop view mode, the selected room is obtained from the saved dock state
#[serde(skip)]
pub selected_room: Option<SelectedRoom>,
/// The currently-selected navigation tab: defines which top-level view is shown.
///
Expand Down
5 changes: 0 additions & 5 deletions src/home/home_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -640,11 +640,6 @@ impl HomeScreen {
fn sync_effective_view_mode(&mut self, cx: &mut Cx, app_state: &mut AppState) {
let is_desktop = effective_is_desktop(cx);
let Some(was_desktop) = self.last_effective_is_desktop.replace(is_desktop) else {
// Mobile mode starts on the rooms list with no room open, so no
// room should be drawn as selected until one is actually clicked.
if !is_desktop {
cx.action(AppStateAction::FocusNone);
}
return;
};
if was_desktop == is_desktop {
Expand Down
Loading