diff --git a/src/app.rs b/src/app.rs index 87bb73db7..8ba3c82a7 100644 --- a/src/app.rs +++ b/src/app.rs @@ -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, /// The currently-selected navigation tab: defines which top-level view is shown. /// diff --git a/src/home/home_screen.rs b/src/home/home_screen.rs index 304b94e37..2349b96e3 100644 --- a/src/home/home_screen.rs +++ b/src/home/home_screen.rs @@ -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 {