Skip to content

Commit

Permalink
Fix Bookmark deletion by selection: Remove only bookmark entry not wh…
Browse files Browse the repository at this point in the history
…ole bookmark

fixes #1044
  • Loading branch information
marcelklehr committed May 20, 2020
1 parent 99d84cd commit 88d32dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/Breadcrumbs.vue
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions src/store/actions.js
Expand Up @@ -487,15 +487,15 @@ 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) {
await dispatch(actions.DELETE_FOLDER, folder.id)
}

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) {
Expand Down

0 comments on commit 88d32dd

Please sign in to comment.