fix: undo task done from list view

This commit is contained in:
kolaente 2022-02-26 13:18:44 +01:00
parent 7b62a0895d
commit 051dd98ff7
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
2 changed files with 7 additions and 4 deletions

View file

@ -190,10 +190,7 @@ export default {
this.$t('task.undoneSuccess'),
}, [{
title: 'Undo',
callback() {
this.task.done = !this.task.done
this.markAsDone(!checked)
},
callback: () => this.undoDone(checked),
}])
}
@ -203,6 +200,11 @@ export default {
await updateFunc() // Don't delay it when un-marking it as it doesn't have an animation the other way around
}
},
undoDone(checked) {
this.task.done = !this.task.done
this.markAsDone(!checked)
},
async toggleFavorite() {
this.task.isFavorite = !this.task.isFavorite

View file

@ -299,6 +299,7 @@ export default defineComponent({
break
}
}
// FIXME: Use computed
sortTasks(this.tasks)
},