mirror of
https://github.com/zadam/trilium.git
synced 2025-11-10 15:25:51 +01:00
fix recent notes (db & sync version increase)
This commit is contained in:
@@ -148,13 +148,13 @@ async function updateOptions(entity, sourceId) {
|
||||
}
|
||||
|
||||
async function updateRecentNotes(entity, sourceId) {
|
||||
const orig = await sql.getRowOrNull("SELECT * FROM recent_notes WHERE branchId = ?", [entity.branchId]);
|
||||
const orig = await sql.getRowOrNull("SELECT * FROM recent_notes WHERE noteId = ?", [entity.noteId]);
|
||||
|
||||
if (orig === null || orig.utcDateCreated < entity.utcDateCreated) {
|
||||
await sql.transactional(async () => {
|
||||
await sql.replace('recent_notes', entity);
|
||||
|
||||
await syncTableService.addRecentNoteSync(entity.branchId, sourceId);
|
||||
await syncTableService.addRecentNoteSync(entity.noteId, sourceId);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user