mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
recent notes are now keyed by note tree id which simplifies things
This commit is contained in:
@@ -92,13 +92,13 @@ async function updateOptions(entity, sourceId) {
|
||||
}
|
||||
|
||||
async function updateRecentNotes(entity, sourceId) {
|
||||
const orig = await sql.getSingleResultOrNull("SELECT * FROM recent_notes WHERE note_path = ?", [entity.note_path]);
|
||||
const orig = await sql.getSingleResultOrNull("SELECT * FROM recent_notes WHERE note_tree_id = ?", [entity.note_tree_id]);
|
||||
|
||||
if (orig === null || orig.date_accessed < entity.date_accessed) {
|
||||
await sql.doInTransaction(async () => {
|
||||
await sql.replace('recent_notes', entity);
|
||||
|
||||
await sync_table.addRecentNoteSync(entity.note_path, sourceId);
|
||||
await sync_table.addRecentNoteSync(entity.note_tree_id, sourceId);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user