chore(downloads-ui): FE-C4 follow-up cleanup
- Delete dead top-level downloads.rename.* i18n block (en/hu/de); the metadata modal moved to downloads.edit.*. Keep downloads.actions.rename (still used by ProfileEditor). - Rename misnamed state renameJob/setRenameJob -> metaJob/setMetaJob in DownloadCenter (it opens MetaEditModal, not a rename dialog). - Extract the duplicated [downloads]/[download-index]/[download-usage] invalidation trio into lib/downloads.ts invalidateDownloads(qc); used by DownloadCenter and DownloadDialog. Behavior-neutral. tsc green, knip shows no new unused export, JSON valid.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
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"] });
|
||||
}
|
||||
Reference in New Issue
Block a user