feat: add tag deletion

This commit is contained in:
thecodrr
2021-07-12 10:32:35 +05:00
parent e75c5f7663
commit 8f3e69cd37
7 changed files with 60 additions and 36 deletions

View File

@@ -34,7 +34,7 @@ export default class Notes extends Collection {
}
if (!!oldNote.tags) {
for (let tag of oldNote.tags) {
await this._db.tags.remove(tag, id);
await this._db.tags.untag(tag, id);
}
}
}
@@ -285,7 +285,7 @@ export default class Notes extends Collection {
}
}
for (let tag of item.tags) {
await this._db.tags.remove(tag, id);
await this._db.tags.untag(tag, id);
}
if (item.data.color) {
await this._db.colors.remove(item.data.color, id);