Web: Files: fixed setSecondaryProgressBarData

This commit is contained in:
Nikita Gopienko 2023-03-30 15:31:35 +03:00
parent 37a9faf760
commit 99565123a4
2 changed files with 24 additions and 3 deletions

View File

@ -715,7 +715,13 @@ class FilesActionStore {
});
try {
await this.deleteItemOperation(isFile, itemId, translations, isRoom);
await this.deleteItemOperation(
isFile,
itemId,
translations,
isRoom,
operationId
);
const id = Array.isArray(itemId) ? itemId : [itemId];
@ -733,7 +739,7 @@ class FilesActionStore {
}
};
deleteItemOperation = (isFile, itemId, translations, isRoom) => {
deleteItemOperation = (isFile, itemId, translations, isRoom, operationId) => {
const { addActiveItems, getIsEmptyTrash } = this.filesStore;
const { withPaging } = this.authStore.settingsStore;
@ -1577,7 +1583,13 @@ class FilesActionStore {
try {
this.setGroupMenuBlocked(true);
await this.deleteItemOperation(false, itemId, translations, true);
await this.deleteItemOperation(
false,
itemId,
translations,
true,
operationId
);
const id = Array.isArray(itemId) ? itemId : [itemId];

View File

@ -33,6 +33,15 @@ class SecondaryProgressDataStore {
}
}
} else {
if (this.secondaryOperationsArray.length === 0) {
const progressDataItems = Object.keys(secondaryProgressData);
for (let key of progressDataItems) {
if (key in this) {
this[key] = secondaryProgressData[key];
}
}
}
this.secondaryOperationsArray.push(secondaryProgressData);
}
};