Skip to content

Commit 42ca32b

Browse files
authored
Merge pull request #49368 from nextcloud/backport/49199/stable29
2 parents bc8d432 + 43b0df9 commit 42ca32b

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

apps/files/src/actions/deleteUtils.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,6 @@ export const isAllFolders = (nodes: Node[]) => {
4242
}
4343

4444
export const displayName = (nodes: Node[], view: View) => {
45-
/**
46-
* If we're in the trashbin, we can only delete permanently
47-
*/
48-
if (view.id === 'trashbin' || !isTrashbinEnabled()) {
49-
return t('files', 'Delete permanently')
50-
}
51-
52-
/**
53-
* If we're in the sharing view, we can only unshare
54-
*/
55-
if (isMixedUnshareAndDelete(nodes)) {
56-
return t('files', 'Delete and unshare')
57-
}
58-
5945
/**
6046
* If those nodes are all the root node of a
6147
* share, we can only unshare them.
@@ -78,6 +64,20 @@ export const displayName = (nodes: Node[], view: View) => {
7864
return t('files', 'Disconnect storages')
7965
}
8066

67+
/**
68+
* If we're in the trashbin, we can only delete permanently
69+
*/
70+
if (view.id === 'trashbin' || !isTrashbinEnabled()) {
71+
return t('files', 'Delete permanently')
72+
}
73+
74+
/**
75+
* If we're in the sharing view, we can only unshare
76+
*/
77+
if (isMixedUnshareAndDelete(nodes)) {
78+
return t('files', 'Delete and unshare')
79+
}
80+
8181
/**
8282
* If we're only selecting files, use proper wording
8383
*/

dist/files-init.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files-init.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)