fix: working state updates for active/non-active downloads

This commit is contained in:
Fredrik Burmester
2025-02-17 20:28:05 +01:00
parent ec153ebfc6
commit 82b981f15c
3 changed files with 96 additions and 45 deletions

View File

@@ -100,7 +100,8 @@ export default function Index() {
const deleteFile = async (id: string) => {
const downloadsDir = FileSystem.documentDirectory + "downloads/";
await FileSystem.deleteAsync(downloadsDir + id + ".json");
await queryClient.invalidateQueries({ queryKey: ["downloadedFiles"] });
await FileSystem.deleteAsync(downloadsDir + id);
refetchDownloadedFiles()
};
return (