This commit is contained in:
Manav Rathi 2024-04-24 16:08:57 +05:30
parent e217635a1b
commit 2b82c61853
No known key found for this signature in database
2 changed files with 24 additions and 24 deletions

View file

@ -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();

View file

@ -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;