Skip to content

Commit 5ee0dc3

Browse files
authored
Merge pull request #12022 from nextcloud/fix/quic-actions/pin-mark-as-spam
fix(quick-actions): pin mark as spam as a last actions step
2 parents 9893cdd + a28adde commit 5ee0dc3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/quickActions/Settings.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<template #icon>
5252
<PlusIcon :size="20" />
5353
</template>
54-
<NcActionButton :close-after-click="true" @click="addQuickAction('markAsSpam')">
54+
<NcActionButton v-if="!deletionAndMovingDisabled" :close-after-click="true" @click="addQuickAction('markAsSpam')">
5555
<template #icon>
5656
<AlertOctagonIcon :size="20" />
5757
</template>
@@ -193,7 +193,7 @@ export default {
193193
},
194194
195195
deletionAndMovingDisabled() {
196-
return this.actions.some((action) => ['deleteThread', 'moveThread'].includes(action.name))
196+
return this.actions.some((action) => ['deleteThread', 'moveThread', 'markAsSpam'].includes(action.name))
197197
},
198198
199199
canSave() {
@@ -328,7 +328,7 @@ export default {
328328
329329
onDrop(e) {
330330
const { removedIndex, addedIndex } = e
331-
if (this.deletionAndMovingDisabled && addedIndex === this.actions.length - 1) {
331+
if (this.deletionAndMovingDisabled && (addedIndex === this.actions.length - 1 || removedIndex === this.actions.length - 1)) {
332332
return
333333
}
334334
const movedItem = this.actions[removedIndex]

0 commit comments

Comments
 (0)