mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 19:36:12 +01:00
fix undelete
This commit is contained in:
@@ -79,7 +79,7 @@ class Note extends AbstractEntity {
|
||||
// ------ Derived attributes ------
|
||||
|
||||
/** @param {boolean} */
|
||||
this.isDecrypted = !row.isProtected || !!row.isContentAvailable;
|
||||
this.isDecrypted = !row.isProtected || row.isContentAvailable;
|
||||
|
||||
this.decrypt();
|
||||
|
||||
@@ -87,6 +87,12 @@ class Note extends AbstractEntity {
|
||||
this.flatTextCache = null;
|
||||
}
|
||||
|
||||
get isContentAvailable() {
|
||||
return !this.noteId // new note which was not encrypted yet
|
||||
|| !this.isProtected
|
||||
|| protectedSessionService.isProtectedSessionAvailable()
|
||||
}
|
||||
|
||||
getParentBranches() {
|
||||
return this.parentBranches;
|
||||
}
|
||||
@@ -852,6 +858,7 @@ class Note extends AbstractEntity {
|
||||
isProtected: this.isProtected,
|
||||
type: this.type,
|
||||
mime: this.mime,
|
||||
isDeleted: false,
|
||||
dateCreated: this.dateCreated,
|
||||
dateModified: this.dateModified,
|
||||
utcDateCreated: this.utcDateCreated,
|
||||
|
||||
Reference in New Issue
Block a user