note cache fixes, #1805

This commit is contained in:
zadam
2021-03-30 21:39:42 +02:00
parent e055d4e15e
commit da741b522e
4 changed files with 16 additions and 6 deletions

View File

@@ -106,6 +106,8 @@ eventService.subscribe([eventService.ENTITY_CHANGED, eventService.ENTITY_DELETED
// first invalidate and only then remove the attribute (otherwise invalidation wouldn't be complete)
if (attr.isAffectingSubtree || note.isTemplate) {
note.invalidateSubtreeCaches();
} else {
note.invalidateThisCache();
}
note.ownedAttributes = note.ownedAttributes.filter(attr => attr.attributeId !== attributeId);
@@ -137,7 +139,7 @@ eventService.subscribe([eventService.ENTITY_CHANGED, eventService.ENTITY_DELETED
note.invalidateSubtreeFlatText();
}
else {
note.flatTextCache = null;
note.invalidateThisCache();
}
}
else {