fix: undo task done from list view
This commit is contained in:
parent
7b62a0895d
commit
051dd98ff7
2 changed files with 7 additions and 4 deletions
|
@ -190,10 +190,7 @@ export default {
|
||||||
this.$t('task.undoneSuccess'),
|
this.$t('task.undoneSuccess'),
|
||||||
}, [{
|
}, [{
|
||||||
title: 'Undo',
|
title: 'Undo',
|
||||||
callback() {
|
callback: () => this.undoDone(checked),
|
||||||
this.task.done = !this.task.done
|
|
||||||
this.markAsDone(!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
|
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() {
|
async toggleFavorite() {
|
||||||
this.task.isFavorite = !this.task.isFavorite
|
this.task.isFavorite = !this.task.isFavorite
|
||||||
|
|
|
@ -299,6 +299,7 @@ export default defineComponent({
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// FIXME: Use computed
|
||||||
sortTasks(this.tasks)
|
sortTasks(this.tasks)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue