Skip to content

armgit / ente

Public Imported from GitHub
0

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

Inline

Manav Rathi2b82c61853e0
diff --git a/web/apps/photos/src/services/upload/uploadCancelService.ts b/web/apps/photos/src/services/upload/uploadCancelService.ts
deleted file mode 100644
index 790245784b..0000000000
--- a/web/apps/photos/src/services/upload/uploadCancelService.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-interface UploadCancelStatus {
- value: boolean;
-}
-
-class UploadCancelService {
- private shouldUploadBeCancelled: UploadCancelStatus = {
- value: false,
- };
-
- reset() {
- this.shouldUploadBeCancelled.value = false;
- }
-
- requestUploadCancelation() {
- this.shouldUploadBeCancelled.value = true;
- }
-
- isUploadCancelationRequested(): boolean {
- return this.shouldUploadBeCancelled.value;
- }
-}
-
-export default new UploadCancelService();
diff --git a/web/apps/photos/src/services/upload/uploadManager.ts b/web/apps/photos/src/services/upload/uploadManager.ts
index 2b4844c142..9917ee8925 100644
--- a/web/apps/photos/src/services/upload/uploadManager.ts
+++ b/web/apps/photos/src/services/upload/uploadManager.ts
@@ -48,7 +48,6 @@ import {
tryParseTakeoutMetadataJSON,
type ParsedMetadataJSON,
} from "./takeout";
-import uploadCancelService from "./uploadCancelService";
import UploadService, {
assetName,
getAssetName,
@@ -59,6 +58,30 @@ import UploadService, {
/** The number of uploads to process in parallel. */
const maxConcurrentUploads = 4;
+interface UploadCancelStatus {
+ value: boolean;
+}
+
+class UploadCancelService {
+ private shouldUploadBeCancelled: UploadCancelStatus = {
+ value: false,
+ };
+
+ reset() {
+ this.shouldUploadBeCancelled.value = false;
+ }
+
+ requestUploadCancelation() {
+ this.shouldUploadBeCancelled.value = true;
+ }
+
+ isUploadCancelationRequested(): boolean {
+ return this.shouldUploadBeCancelled.value;
+ }
+}
+
+const uploadCancelService = new UploadCancelService();
+
class UIService {
private progressUpdater: ProgressUpdater;