remove from progress section instead of adding to result list
This commit is contained in:
parent
d8b9e81f49
commit
9c683dfea5
|
@ -70,6 +70,10 @@ class UIService {
|
||||||
this.updateProgressBarUI();
|
this.updateProgressBarUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
removeFromInProgressList(key: number) {
|
||||||
|
this.inProgressUploads.delete(key);
|
||||||
|
}
|
||||||
|
|
||||||
moveFileToResultList(key: number, uploadResult: UPLOAD_RESULT) {
|
moveFileToResultList(key: number, uploadResult: UPLOAD_RESULT) {
|
||||||
this.finishedUploads.set(key, uploadResult);
|
this.finishedUploads.set(key, uploadResult);
|
||||||
this.inProgressUploads.delete(key);
|
this.inProgressUploads.delete(key);
|
||||||
|
|
|
@ -305,10 +305,6 @@ class UploadManager {
|
||||||
file
|
file
|
||||||
)} `
|
)} `
|
||||||
);
|
);
|
||||||
UIService.moveFileToResultList(
|
|
||||||
localID,
|
|
||||||
UPLOAD_RESULT.UPLOADED
|
|
||||||
);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.message === CustomError.UPLOAD_CANCELLED) {
|
if (e.message === CustomError.UPLOAD_CANCELLED) {
|
||||||
throw e;
|
throw e;
|
||||||
|
@ -327,6 +323,7 @@ class UploadManager {
|
||||||
metadata: metadata && { ...metadata },
|
metadata: metadata && { ...metadata },
|
||||||
filePath: filePath,
|
filePath: filePath,
|
||||||
});
|
});
|
||||||
|
UIService.removeFromInProgressList(localID);
|
||||||
UIService.increaseFileUploaded();
|
UIService.increaseFileUploaded();
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
Loading…
Reference in a new issue