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();
|
||||
}
|
||||
|
||||
removeFromInProgressList(key: number) {
|
||||
this.inProgressUploads.delete(key);
|
||||
}
|
||||
|
||||
moveFileToResultList(key: number, uploadResult: UPLOAD_RESULT) {
|
||||
this.finishedUploads.set(key, uploadResult);
|
||||
this.inProgressUploads.delete(key);
|
||||
|
|
|
@ -305,10 +305,6 @@ class UploadManager {
|
|||
file
|
||||
)} `
|
||||
);
|
||||
UIService.moveFileToResultList(
|
||||
localID,
|
||||
UPLOAD_RESULT.UPLOADED
|
||||
);
|
||||
} catch (e) {
|
||||
if (e.message === CustomError.UPLOAD_CANCELLED) {
|
||||
throw e;
|
||||
|
@ -327,6 +323,7 @@ class UploadManager {
|
|||
metadata: metadata && { ...metadata },
|
||||
filePath: filePath,
|
||||
});
|
||||
UIService.removeFromInProgressList(localID);
|
||||
UIService.increaseFileUploaded();
|
||||
}
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in a new issue