Merge pull request #924 from ONLYOFFICE/bugfix/fixed-folder-deletion

Bugfix/fixed folder deletion
This commit is contained in:
Nikita Gopienko 2022-10-18 14:48:36 +03:00 committed by GitHub
commit cf3f17a72e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -95,10 +95,12 @@ const DeleteDialogComponent = (props) => {
};
const moveToTrashNoteText = () => {
const isFolder = selection[0]?.isFolder || !!selection[0]?.parentId;
if (selection.length > 1) {
return t("MoveToTrashItems");
} else {
return !selection[0]?.isFolder
return !isFolder
? t("MoveToTrashFile")
: personal
? ""

View File

@ -267,6 +267,7 @@ class SectionHeaderContent extends React.Component {
deleteOperation: t("Translations:DeleteOperation"),
deleteFromTrash: t("Translations:DeleteFromTrash"),
deleteSelectedElem: t("Translations:DeleteSelectedElem"),
FolderRemoved: t("Files:FolderRemoved"),
};
deleteAction(translations, [currentFolderId], true).catch((err) =>

View File

@ -296,7 +296,7 @@ class FilesActionStore {
return toastr.success(translations.FolderRemoved);
};
if (withPaging) {
if (withPaging || this.dialogsStore.isFolderActions) {
this.updateCurrentFolder(fileIds, folderIds, false);
showToast();
} else {