mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	added getTargetNote to froca's attribute, fixes #2981
This commit is contained in:
		| @@ -47,7 +47,7 @@ class NoteRevision extends AbstractEntity { | ||||
|     static get primaryKeyName() { return "noteRevisionId"; } | ||||
|     static get hashedProperties() { return ["noteRevisionId", "noteId", "title", "isProtected", "dateLastEdited", "dateCreated", "utcDateLastEdited", "utcDateCreated", "utcDateModified"]; } | ||||
|  | ||||
|     constructor(row) { | ||||
|     constructor(row, titleDecrypted = false) { | ||||
|         super(); | ||||
|  | ||||
|         /** @type {string} */ | ||||
| @@ -75,13 +75,10 @@ class NoteRevision extends AbstractEntity { | ||||
|         /** @type {number} */ | ||||
|         this.contentLength = row.contentLength; | ||||
|  | ||||
|         if (this.isProtected) { | ||||
|             if (protectedSessionService.isProtectedSessionAvailable()) { | ||||
|                 this.title = protectedSessionService.decryptString(this.title); | ||||
|             } | ||||
|             else { | ||||
|                 this.title = "[protected]"; | ||||
|             } | ||||
|         if (this.isProtected && !titleDecrypted) { | ||||
|             this.title = protectedSessionService.isProtectedSessionAvailable() | ||||
|                 ? protectedSessionService.decryptString(this.title) | ||||
|                 : "[protected]"; | ||||
|         } | ||||
|     } | ||||
|  | ||||
| @@ -96,8 +93,8 @@ class NoteRevision extends AbstractEntity { | ||||
|  | ||||
|     /* | ||||
|      * Note revision content has quite special handling - it's not a separate entity, but a lazily loaded | ||||
|      * part of NoteRevision entity with it's own sync. Reason behind this hybrid design is that | ||||
|      * content can be quite large and it's not necessary to load it / fill memory for any note access even | ||||
|      * part of NoteRevision entity with its own sync. Reason behind this hybrid design is that | ||||
|      * content can be quite large, and it's not necessary to load it / fill memory for any note access even | ||||
|      * if we don't need a content, especially for bulk operations like search. | ||||
|      * | ||||
|      * This is the same approach as is used for Note's content. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user