diff --git a/src/components/TaskList.tsx b/src/components/TaskList.tsx index adf3b00..3fce1b4 100644 --- a/src/components/TaskList.tsx +++ b/src/components/TaskList.tsx @@ -47,7 +47,7 @@ class TaskList extends React.PureComponent { }; render() { - const entries = this.props.entries.filter((x) => !x.completed); + const entries = this.props.entries.filter((x) => !x.finished); const sortedEntries = sortSelector(entries); let itemList = sortedEntries.map((entry, idx, array) => { diff --git a/src/pim-types.ts b/src/pim-types.ts index 02acdf7..bb6fa98 100644 --- a/src/pim-types.ts +++ b/src/pim-types.ts @@ -71,9 +71,9 @@ export class TaskType extends EventType { super(comp ? comp : new ICAL.Component('vtodo')); } - get completed() { - const status = this.component.getFirstPropertyValue('status'); - return status === 'COMPLETED'; + get finished() { + return this.status === TaskStatusType.Completed || + this.status === TaskStatusType.Cancelled; } set status(status: TaskStatusType) {