diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-11-19 11:45:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-19 11:45:31 +0100 |
commit | bb2e8e01c37de071ef7401e916399da005ff4ce9 (patch) | |
tree | 21b85d5f9406b9648f911a49646237d59408b3b1 /apps/files/src | |
parent | 6559c2075e46c796ff518b0e23e38534783ed194 (diff) | |
parent | d9eb29c52557ef76995beb1dd3e12e01b29aa1b1 (diff) | |
download | nextcloud-server-bb2e8e01c37de071ef7401e916399da005ff4ce9.tar.gz nextcloud-server-bb2e8e01c37de071ef7401e916399da005ff4ce9.zip |
Merge pull request #49199 from nextcloud/fix/files/delete-display-no-trashbin
Diffstat (limited to 'apps/files/src')
-rw-r--r-- | apps/files/src/actions/deleteUtils.ts | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/apps/files/src/actions/deleteUtils.ts b/apps/files/src/actions/deleteUtils.ts index b781be0ff16..ef395bae5b7 100644 --- a/apps/files/src/actions/deleteUtils.ts +++ b/apps/files/src/actions/deleteUtils.ts @@ -43,20 +43,6 @@ export const isAllFolders = (nodes: Node[]) => { export const displayName = (nodes: Node[], view: View) => { /** - * If we're in the trashbin, we can only delete permanently - */ - if (view.id === 'trashbin' || !isTrashbinEnabled()) { - return t('files', 'Delete permanently') - } - - /** - * If we're in the sharing view, we can only unshare - */ - if (isMixedUnshareAndDelete(nodes)) { - return t('files', 'Delete and unshare') - } - - /** * If those nodes are all the root node of a * share, we can only unshare them. */ @@ -79,6 +65,20 @@ export const displayName = (nodes: Node[], view: View) => { } /** + * If we're in the trashbin, we can only delete permanently + */ + if (view.id === 'trashbin' || !isTrashbinEnabled()) { + return t('files', 'Delete permanently') + } + + /** + * If we're in the sharing view, we can only unshare + */ + if (isMixedUnshareAndDelete(nodes)) { + return t('files', 'Delete and unshare') + } + + /** * If we're only selecting files, use proper wording */ if (isAllFiles(nodes)) { |