From 59efe9e2d7f75c6b66ecb316fd7f5768fcaa28cd Mon Sep 17 00:00:00 2001 From: ddidderr Date: Tue, 19 May 2026 21:28:23 +0200 Subject: [PATCH] fix(ui): close detail modal when removing downloads Confirming removal from the game detail modal used to clear only the confirmation modal state. The detail modal remained open for the same game while the removal operation was in flight, which could show stale removing or post-removal state around the closed confirmation dialog. Close the detail modal when it is showing the game whose downloaded copy is being removed. Other open detail state is left alone so the change stays scoped to the confirmed removal flow. Test Plan: - deno task build - RUSTC_WRAPPER= CARGO_BUILD_RUSTC_WRAPPER= just build - git diff --check Refs: local review feedback --- crates/lanspread-tauri-deno-ts/src/windows/MainWindow.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/lanspread-tauri-deno-ts/src/windows/MainWindow.tsx b/crates/lanspread-tauri-deno-ts/src/windows/MainWindow.tsx index 1b087a2..da8f4e5 100644 --- a/crates/lanspread-tauri-deno-ts/src/windows/MainWindow.tsx +++ b/crates/lanspread-tauri-deno-ts/src/windows/MainWindow.tsx @@ -97,6 +97,7 @@ export const MainWindow = () => { const confirmRemoveDownload = useCallback((game: Game) => { actions.removeDownload(game.id); setRemoveGameId(null); + setOpenGameId(current => current === game.id ? null : current); }, [actions]); const kebabItems: ReadonlyArray = useMemo(() => [