diff --git a/crates/openlogi-gui/src/app_menu.rs b/crates/openlogi-gui/src/app_menu.rs index 7530edb7..d718c3f6 100644 --- a/crates/openlogi-gui/src/app_menu.rs +++ b/crates/openlogi-gui/src/app_menu.rs @@ -223,10 +223,13 @@ fn device_menu_items(cx: &App) -> Vec { Some(battery) => format!("{} ยท {}%", record.display_name, battery.percentage), None => record.display_name.clone(), }; - items.push(MenuItem::action(title, OpenSettings).disabled(true)); + items.push(MenuItem::action(title, gpui::NoAction).disabled(true)); } } - _ => items.push(MenuItem::action(tr!("No devices connected"), OpenSettings).disabled(true)), + _ => { + items + .push(MenuItem::action(tr!("No devices connected"), gpui::NoAction).disabled(true)); + } } items diff --git a/crates/openlogi-gui/src/main.rs b/crates/openlogi-gui/src/main.rs index 07d07d06..ab4380ab 100644 --- a/crates/openlogi-gui/src/main.rs +++ b/crates/openlogi-gui/src/main.rs @@ -312,7 +312,7 @@ fn main() -> Result<()> { // Scanning window overlaps the first sync's completion). let force_refresh = inventory_ready && std::mem::take(&mut assets_dirty); let (auto_download, asset_source, models) = cx.update(|cx| { - let (changed, auto_download, asset_source, models) = cx.update_global::(|state, _| { + let (changed, merged, auto_download, asset_source, models) = cx.update_global::(|state, _| { // Merge only *completed* enumerations. A not-yet-ready // agent can only serve an empty pre-enumeration list, and // counting those as misses would wipe the device list (and @@ -334,16 +334,20 @@ fn main() -> Result<()> { let settings = state.app_settings(); ( changed, + merged, settings.auto_download_assets, settings.asset_source, state.asset_models(), ) }); // The steady poll mostly repeats an identical snapshot; - // skip the full-window invalidation for those. + // skip the full-window invalidation and menu rebuild for those. if changed { cx.refresh_windows(); } + if merged { + app_menu::rebuild(cx); + } (auto_download, asset_source, models) }); // Kick off (or re-arm) the background asset sync. The