mirror of https://github.com/nextcloud/bookmarks
Fix Bookmark deletion by selection: Remove only bookmark entry not whole bookmark
fixes #1044
This commit is contained in:
parent
99d84cd213
commit
88d32dd23b
|
@ -150,7 +150,7 @@ export default {
|
|||
},
|
||||
|
||||
async onBulkDelete() {
|
||||
await this.$store.dispatch(actions.DELETE_SELECTION)
|
||||
await this.$store.dispatch(actions.DELETE_SELECTION, { folder: this.$route.params.folder })
|
||||
this.$store.commit(mutations.RESET_SELECTION)
|
||||
},
|
||||
onBulkMove() {
|
||||
|
|
|
@ -487,7 +487,7 @@ export default {
|
|||
throw err
|
||||
}
|
||||
},
|
||||
async [actions.DELETE_SELECTION]({ commit, dispatch, state }) {
|
||||
async [actions.DELETE_SELECTION]({ commit, dispatch, state }, { folder }) {
|
||||
commit(mutations.FETCH_START, { type: 'deleteSelection' })
|
||||
try {
|
||||
for (const folder of state.selection.folders) {
|
||||
|
@ -495,7 +495,7 @@ export default {
|
|||
}
|
||||
|
||||
for (const bookmark of state.selection.bookmarks) {
|
||||
await dispatch(actions.DELETE_BOOKMARK, { id: bookmark.id })
|
||||
await dispatch(actions.DELETE_BOOKMARK, { id: bookmark.id, folder })
|
||||
}
|
||||
commit(mutations.FETCH_END, 'deleteSelection')
|
||||
} catch (err) {
|
||||
|
|
Loading…
Reference in New Issue