From 7aaf58e0a5e831efc93d66f2f4e5f65c4378fbf5 Mon Sep 17 00:00:00 2001 From: jakub-tldr <78603704+jakub-tldr@users.noreply.github.com> Date: Thu, 23 Oct 2025 22:17:40 +0200 Subject: [PATCH] refresh tray icon after instance deletion --- src-tauri/src/commands.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src-tauri/src/commands.rs b/src-tauri/src/commands.rs index 2c440913..7eaa7f48 100644 --- a/src-tauri/src/commands.rs +++ b/src-tauri/src/commands.rs @@ -853,6 +853,10 @@ pub async fn delete_instance(instance_id: Id, handle: AppHandle) -> Result<(), E reload_tray_menu(&handle).await; + let app_state: State = handle.state(); + let theme = { app_state.app_config.lock().unwrap().tray_theme }; + configure_tray_icon(&handle, theme).await?; + handle.emit(EventKey::InstanceUpdate.into(), ())?; info!("Successfully deleted instance {instance}."); Ok(())