aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/packages/ui/src/stores
diff options
context:
space:
mode:
authorkrypton <krypton@hydroroll.team>2026-03-31 08:59:58 +0800
committerkrypton <krypton@hydroroll.team>2026-03-31 08:59:58 +0800
commit7adcf5b548b2638032f36957889711cf78dbf851 (patch)
tree4eb14fef39aa0eabdd25b9a63e12be75a2181cb8 /packages/ui/src/stores
parent5f93323760fb46f06d391996f17e87b7405769d4 (diff)
downloadDropOut-7adcf5b548b2638032f36957889711cf78dbf851.tar.gz
DropOut-7adcf5b548b2638032f36957889711cf78dbf851.zip
fix: resolve cleanup and formatBytes bugs in download progressfix/download-progress-bugs
Diffstat (limited to 'packages/ui/src/stores')
-rw-r--r--packages/ui/src/stores/download-store.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/ui/src/stores/download-store.ts b/packages/ui/src/stores/download-store.ts
index a33d79d..ccaf75a 100644
--- a/packages/ui/src/stores/download-store.ts
+++ b/packages/ui/src/stores/download-store.ts
@@ -160,6 +160,19 @@ export const useDownloadStore = create<DownloadState>((set, get) => ({
}
unlisteners = [];
initialized = false;
+ // Reset state on cleanup to avoid residual state
+ set({
+ phase: "idle",
+ totalFiles: 0,
+ completedFiles: 0,
+ currentFile: "",
+ currentFileStatus: "",
+ currentFileDownloaded: 0,
+ currentFileTotal: 0,
+ totalDownloadedBytes: 0,
+ errorMessage: null,
+ phaseLabel: "",
+ });
},
reset: () => {