Skip to content

Commit

Permalink
Web: files: Removed a blank page when restoring files from the recycl…
Browse files Browse the repository at this point in the history
…e bin.
  • Loading branch information
TatianaLopaeva committed Nov 9, 2021
1 parent 57f65b4 commit aa3aff1
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions products/ASC.Files/Client/src/store/UploadDataStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,14 @@ class UploadDataStore {

moveToCopyTo = (destFolderId, pbData, isCopy) => {
const { treeFolders, setTreeFolders } = this.treeFoldersStore;
const { fetchFiles, filter } = this.filesStore;
const {
fetchFiles,
filter,
selection,
isEmptyLastPageAfterOperation,
resetFilterPage,
} = this.filesStore;

const {
clearSecondaryProgressData,
setSecondaryProgressBarData,
Expand All @@ -912,11 +919,20 @@ class UploadDataStore {
loopTreeFolders(path, newTreeFolders, folders, foldersCount);

if (!isCopy || destFolderId === this.selectedFolderStore.id) {
fetchFiles(this.selectedFolderStore.id, filter, true, true).finally(
() => {
setTimeout(() => clearSecondaryProgressData(), TIMEOUT);
}
);
let newFilter;

if (selection && isEmptyLastPageAfterOperation(selection.length)) {
newFilter = resetFilterPage();
}

fetchFiles(
this.selectedFolderStore.id,
newFilter ? newFilter : filter,
true,
true
).finally(() => {
setTimeout(() => clearSecondaryProgressData(), TIMEOUT);
});
} else {
setSecondaryProgressBarData({
icon: pbData.icon,
Expand Down

0 comments on commit aa3aff1

Please sign in to comment.