fix extra refresh because of duplicated sync event, closes #1063

This commit is contained in:
zadam 2020-05-30 22:35:18 +02:00
parent 5e353a5612
commit 75bd395669
2 changed files with 7 additions and 1 deletions

View File

@ -165,6 +165,10 @@ async function consumeSyncData() {
utils.reloadApp();
}
for (const syncRow of nonProcessedSyncRows) {
processedSyncIds.add(syncRow.id);
}
lastProcessedSyncId = Math.max(lastProcessedSyncId, allSyncRows[allSyncRows.length - 1].id);
}

View File

@ -662,7 +662,9 @@ async function scanForLinks(note) {
const content = await note.getContent();
const newContent = await saveLinks(note, content);
await note.setContent(newContent);
if (content !== newContent) {
await note.setContent(newContent);
}
}
catch (e) {
log.error(`Could not scan for links note ${note.noteId}: ${e.message} ${e.stack}`);