π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Inline
Manav Rathi2b82c61853e0
diff --git a/web/apps/photos/src/services/upload/uploadCancelService.ts b/web/apps/photos/src/services/upload/uploadCancelService.tsdeleted file mode 100644index 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.tsindex 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;