import type { QueryClient } from "@tanstack/react-query"; // The download queue, the per-card download index, and the storage-usage meter all move together // whenever a job is enqueued, deleted, or its state changes — invalidate them as one unit. export function invalidateDownloads(qc: QueryClient) { qc.invalidateQueries({ queryKey: ["downloads"] }); qc.invalidateQueries({ queryKey: ["download-index"] }); qc.invalidateQueries({ queryKey: ["download-usage"] }); }