|
|
@ -210,9 +210,14 @@ export class TaskType extends EventType {
|
|
|
|
|
|
|
|
|
|
|
|
set tags(tags: string[]) {
|
|
|
|
set tags(tags: string[]) {
|
|
|
|
const property = this.component.getFirstProperty("categories");
|
|
|
|
const property = this.component.getFirstProperty("categories");
|
|
|
|
|
|
|
|
const empty = tags.length === 0;
|
|
|
|
if (property) {
|
|
|
|
if (property) {
|
|
|
|
property.setValues(tags);
|
|
|
|
if (empty) {
|
|
|
|
|
|
|
|
this.component.removeAllProperties("categories");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
property.setValues(tags);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else if (!empty) {
|
|
|
|
const newProp = new ICAL.Property("categories", this.component);
|
|
|
|
const newProp = new ICAL.Property("categories", this.component);
|
|
|
|
newProp.setValues(tags);
|
|
|
|
newProp.setValues(tags);
|
|
|
|
this.component.addProperty(newProp);
|
|
|
|
this.component.addProperty(newProp);
|
|
|
|