Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix(UploadProgressV2):multiple-upload-reset

Aswin Asoka477b0268b81
diff --git a/web/packages/gallery/components/upload-progress-v2/UploadProgressV2.tsx b/web/packages/gallery/components/upload-progress-v2/UploadProgressV2.tsx
index 7597500d54..3b2872a203 100644
--- a/web/packages/gallery/components/upload-progress-v2/UploadProgressV2.tsx
+++ b/web/packages/gallery/components/upload-progress-v2/UploadProgressV2.tsx
@@ -1,6 +1,6 @@
import type { PreUploadSkippedFile } from "ente-base/types/ipc";
import type { UploadPhase } from "ente-gallery/services/upload";
-import { useState } from "react";
+import { useEffect, useState } from "react";
import { UploadCompletionV2 } from "../UploadCompletionV2";
import type {
InProgressUpload,
@@ -64,6 +64,10 @@ function UploadProgress({
const [showStopConfirmation, setShowStopConfirmation] = useState(false);
const [summaryMode, setSummaryMode] = useState<"review" | "cancelling">();
+ useEffect(() => {
+ if (uploadPhase == "preparing") setSummaryMode(undefined);
+ }, [uploadPhase]);
+
const handleClose = () =>
uploadPhase == "done" ? onClose() : setShowStopConfirmation(true);