Fix Bookmark deletion by selection: Remove only bookmark entry not whole bookmark

fixes #1044
This commit is contained in:
Marcel Klehr 2020-05-20 11:42:08 +02:00
parent 99d84cd213
commit 88d32dd23b
2 changed files with 3 additions and 3 deletions

View File

@ -150,7 +150,7 @@ export default {
}, },
async onBulkDelete() { 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) this.$store.commit(mutations.RESET_SELECTION)
}, },
onBulkMove() { onBulkMove() {

View File

@ -487,7 +487,7 @@ export default {
throw err throw err
} }
}, },
async [actions.DELETE_SELECTION]({ commit, dispatch, state }) { async [actions.DELETE_SELECTION]({ commit, dispatch, state }, { folder }) {
commit(mutations.FETCH_START, { type: 'deleteSelection' }) commit(mutations.FETCH_START, { type: 'deleteSelection' })
try { try {
for (const folder of state.selection.folders) { for (const folder of state.selection.folders) {
@ -495,7 +495,7 @@ export default {
} }
for (const bookmark of state.selection.bookmarks) { 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') commit(mutations.FETCH_END, 'deleteSelection')
} catch (err) { } catch (err) {