Skip to content

Commit 3572e3c

Browse files
authored
refresh tray icon after instance deletion (#639)
1 parent 7973526 commit 3572e3c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src-tauri/src/commands.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,10 @@ pub async fn delete_instance(instance_id: Id, handle: AppHandle) -> Result<(), E
853853

854854
reload_tray_menu(&handle).await;
855855

856+
let app_state: State<AppState> = handle.state();
857+
let theme = { app_state.app_config.lock().unwrap().tray_theme };
858+
configure_tray_icon(&handle, theme).await?;
859+
856860
handle.emit(EventKey::InstanceUpdate.into(), ())?;
857861
info!("Successfully deleted instance {instance}.");
858862
Ok(())

0 commit comments

Comments
 (0)