Make task.completed expect only bool

Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
This commit is contained in:
Raimund Schlüßler 2019-10-24 22:23:29 +02:00
parent a583946f54
commit 4b7f5fbb80
No known key found for this signature in database
GPG key ID: 036FA7EB1A599178

View file

@ -250,7 +250,7 @@ export default class Task {
this.status = 'IN-PROCESS'
}
} else {
this.completed = ICAL.Time.now()
this.completed = true
this.status = 'COMPLETED'
}
this._complete = this.vtodo.getFirstPropertyValue('percent-complete') || 0
@ -262,7 +262,7 @@ export default class Task {
set completed(completed) {
if (completed) {
this.vtodo.updatePropertyWithValue('completed', completed)
this.vtodo.updatePropertyWithValue('completed', ICAL.Time.now())
} else {
this.vtodo.removeProperty('completed')
}