mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix recent changes to show all deleted notes (also without note revisions)
This commit is contained in:
parent
b12008e313
commit
845907b8d2
@ -31,19 +31,36 @@ function getRecentChanges(req) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// now we need to also collect date points not represented in note revisions:
|
||||||
|
// 1. creation for all notes (dateCreated)
|
||||||
|
// 2. deletion for deleted notes (dateModified)
|
||||||
const notes = sql.getRows(`
|
const notes = sql.getRows(`
|
||||||
SELECT
|
SELECT
|
||||||
notes.noteId,
|
notes.noteId,
|
||||||
notes.isDeleted AS current_isDeleted,
|
notes.isDeleted AS current_isDeleted,
|
||||||
notes.deleteId AS current_deleteId,
|
notes.deleteId AS current_deleteId,
|
||||||
notes.isErased AS current_isErased,
|
notes.isErased AS current_isErased,
|
||||||
notes.title AS current_title,
|
notes.title AS current_title,
|
||||||
notes.isProtected AS current_isProtected,
|
notes.isProtected AS current_isProtected,
|
||||||
notes.title,
|
notes.title,
|
||||||
notes.utcDateCreated AS utcDate,
|
notes.utcDateCreated AS utcDate,
|
||||||
notes.dateCreated AS date
|
notes.dateCreated AS date
|
||||||
FROM
|
FROM
|
||||||
notes`);
|
notes
|
||||||
|
UNION ALL
|
||||||
|
SELECT
|
||||||
|
notes.noteId,
|
||||||
|
notes.isDeleted AS current_isDeleted,
|
||||||
|
notes.deleteId AS current_deleteId,
|
||||||
|
notes.isErased AS current_isErased,
|
||||||
|
notes.title AS current_title,
|
||||||
|
notes.isProtected AS current_isProtected,
|
||||||
|
notes.title,
|
||||||
|
notes.utcDateModified AS utcDate,
|
||||||
|
notes.dateModified AS date
|
||||||
|
FROM
|
||||||
|
notes
|
||||||
|
WHERE notes.isDeleted = 1 AND notes.isErased = 0`);
|
||||||
|
|
||||||
for (const note of notes) {
|
for (const note of notes) {
|
||||||
if (noteCacheService.isInAncestor(note.noteId, ancestorNoteId)) {
|
if (noteCacheService.isInAncestor(note.noteId, ancestorNoteId)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user