refactor(web): simplify some stores (#11695)

* refactor(web): simplify some stores

* make writable
This commit is contained in:
Michel Heusschen
2024-08-11 14:01:16 +02:00
committed by GitHub
parent 34c4fbf730
commit efdf8bbca9
5 changed files with 57 additions and 143 deletions
+1 -5
View File
@@ -10,11 +10,7 @@ export interface DownloadProgress {
export const downloadAssets = writable<Record<string, DownloadProgress>>({});
export const isDownloading = derived(downloadAssets, ($downloadAssets) => {
if (Object.keys($downloadAssets).length === 0) {
return false;
}
return true;
return Object.keys($downloadAssets).length > 0;
});
const update = (key: string, value: Partial<DownloadProgress> | null) => {