Skip to content

Commit

Permalink
fix: Properly undo card deletion in the frontend
Browse files Browse the repository at this point in the history
Signed-off-by: Julius H盲rtl <jus@bitgrid.net>
  • Loading branch information
juliushaertl committed Nov 17, 2023
1 parent 8c29c1b commit 6c18f50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/cards/CardMenuEntries.vue
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ export default {
},
deleteCard() {
this.$store.dispatch('deleteCard', this.card)
showUndo(t('deck', 'Card deleted'), () => this.$store.dispatch('cardUndoDelete', this.card))
const undoCard = { ...this.card, deletedAt: 0 }
showUndo(t('deck', 'Card deleted'), () => this.$store.dispatch('cardUndoDelete', undoCard))
},
changeCardDoneStatus() {
this.$store.dispatch('changeCardDoneStatus', { ...this.card, done: !this.card.done })
Expand Down

0 comments on commit 6c18f50

Please sign in to comment.