diff --git a/src/app/features/files/components/confirm-move-file-dialog/confirm-move-file-dialog.component.ts b/src/app/features/files/components/confirm-move-file-dialog/confirm-move-file-dialog.component.ts index 373a517f2..82667ec46 100644 --- a/src/app/features/files/components/confirm-move-file-dialog/confirm-move-file-dialog.component.ts +++ b/src/app/features/files/components/confirm-move-file-dialog/confirm-move-file-dialog.component.ts @@ -74,7 +74,7 @@ export class ConfirmMoveFileDialogComponent { files.forEach((file) => { const link = file.links.move; this.filesService - .moveFile(link, path, this.fileProjectId, this.provider(), action) + .moveFile(link, path, this.fileProjectId, this.provider, action) .pipe( takeUntilDestroyed(this.destroyRef), catchError((error) => { @@ -116,7 +116,7 @@ export class ConfirmMoveFileDialogComponent { acceptLabelKey: 'common.buttons.replace', onConfirm: () => { const replaceRequests$ = conflictFiles.map(({ link }) => - this.filesService.moveFile(link, path, this.fileProjectId, this.provider(), action, true).pipe( + this.filesService.moveFile(link, path, this.fileProjectId, this.provider, action, true).pipe( takeUntilDestroyed(this.destroyRef), catchError(() => of(null)) ) diff --git a/src/app/features/files/pages/files/files.component.html b/src/app/features/files/pages/files/files.component.html index c264f5b0c..631eceea2 100644 --- a/src/app/features/files/pages/files/files.component.html +++ b/src/app/features/files/pages/files/files.component.html @@ -150,7 +150,7 @@ (setCurrentFolder)="setCurrentFolder($event)" (setMoveDialogCurrentFolder)="setMoveDialogCurrentFolder($event)" (updateFoldersStack)="onUpdateFoldersStack($event)" - (resetFilesProvider)="resetProvider()" + (resetFilesProvider)="resetOnDialogClose()" > diff --git a/src/app/features/files/pages/files/files.component.ts b/src/app/features/files/pages/files/files.component.ts index 38e8620cd..3653caa67 100644 --- a/src/app/features/files/pages/files/files.component.ts +++ b/src/app/features/files/pages/files/files.component.ts @@ -445,7 +445,8 @@ export class FilesComponent { } onFileTreeSelected(file: FileModel): void { - this.filesSelection = [...this.filesSelection, file]; + this.filesSelection.push(file); + this.filesSelection = [...new Set(this.filesSelection)]; } onFileTreeUnselected(file: FileModel): void { @@ -542,6 +543,12 @@ export class FilesComponent { } } + resetOnDialogClose(): void { + this.onClearSelection(); + this.resetProvider(); + this.updateFilesList(); + } + createFolder(): void { const currentFolder = this.currentFolder(); const newFolderLink = currentFolder?.links.newFolder;