refactorings

This commit is contained in:
zadam
2023-04-14 16:49:06 +02:00
parent 34ecd77bd4
commit f01657e1dd
20 changed files with 336 additions and 393 deletions

View File

@@ -63,6 +63,12 @@ class BNoteRevision extends AbstractBeccaEntity {
return utils.isStringNote(this.type, this.mime);
}
isContentAvailable() {
return !this.noteRevisionId // new note which was not encrypted yet
|| !this.isProtected
|| protectedSessionService.isProtectedSessionAvailable()
}
/*
* Note revision content has quite special handling - it's not a separate entity, but a lazily loaded
* part of NoteRevision entity with its own sync. Reason behind this hybrid design is that