Fix undo when marking a task as done

This commit is contained in:
kolaente 2021-04-15 17:17:45 +02:00
parent f9844384be
commit 30067935d1
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 5 additions and 6 deletions

View File

@ -170,7 +170,7 @@ export default {
const updateFunc = () => { const updateFunc = () => {
this.taskService.update(this.task) this.taskService.update(this.task)
.then(t => { .then(t => {
if(this.task.done) { if (this.task.done) {
playPop() playPop()
} }
this.task = t this.task = t
@ -180,11 +180,10 @@ export default {
this, this,
[{ [{
title: 'Undo', title: 'Undo',
callback: () => this.markAsDone({ callback: () => {
target: { this.task.done = !this.task.done
checked: !checked, this.markAsDone(!checked)
}, }
}),
}], }],
) )
}) })