mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	fix wrong dateLastEdited timestamp, closes #1254
This commit is contained in:
		| @@ -466,27 +466,7 @@ function saveNoteRevision(note) { | ||||
|     const msSinceDateCreated = now.getTime() - dateUtils.parseDateTime(note.utcDateCreated).getTime(); | ||||
|  | ||||
|     if (!existingNoteRevisionId && msSinceDateCreated >= noteRevisionSnapshotTimeInterval * 1000) { | ||||
|         const content = note.getContent(); | ||||
|  | ||||
|         if (!content) { | ||||
|             return; | ||||
|         } | ||||
|  | ||||
|         const noteRevision = new NoteRevision({ | ||||
|             noteId: note.noteId, | ||||
|             // title and text should be decrypted now | ||||
|             title: note.title, | ||||
|             type: note.type, | ||||
|             mime: note.mime, | ||||
|             isProtected: false, // will be fixed in the protectNoteRevisions() call | ||||
|             utcDateLastEdited: note.utcDateModified, | ||||
|             utcDateCreated: dateUtils.utcNowDateTime(), | ||||
|             utcDateModified: dateUtils.utcNowDateTime(), | ||||
|             dateLastEdited: note.dateModified, | ||||
|             dateCreated: dateUtils.localNowDateTime() | ||||
|         }).save(); | ||||
|  | ||||
|         noteRevision.setContent(content); | ||||
|         noteRevisionService.createNoteRevision(note); | ||||
|     } | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user