From ef000a08ccd3f7e3245107164724687eb15aac88 Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Wed, 15 Apr 2026 12:35:50 -0700 Subject: [PATCH] Fixes to delete button --- src/App.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 2314ea4..dbe90f6 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -184,7 +184,9 @@ export default function App () { { + onClick={async e => { + e.stopPropagation() + const response = await ask( `This ${ f.is_dir ? 'folder' : 'file' @@ -198,7 +200,12 @@ export default function App () { kind: 'warning' } ) - if (response) await invoke('remove_item', { path: f.path }) + if (!response) return + + await invoke('remove_item', { path: f.path }) + setFiles(prev => + prev.filter(x => !x.path.startsWith(f.path)) + ) }} />