mirror of
https://github.com/zadam/trilium.git
synced 2025-11-10 15:25:51 +01:00
fix problems with updating note in note cache when entities are coming out of order (e.g. sync)
This commit is contained in:
@@ -37,11 +37,11 @@ async function sync() {
|
||||
do {
|
||||
const syncContext = await login();
|
||||
|
||||
await pushSync(syncContext);
|
||||
await pushChanges(syncContext);
|
||||
|
||||
await pullSync(syncContext);
|
||||
await pullChanges(syncContext);
|
||||
|
||||
await pushSync(syncContext);
|
||||
await pushChanges(syncContext);
|
||||
|
||||
await syncFinished(syncContext);
|
||||
|
||||
@@ -122,7 +122,7 @@ async function doLogin() {
|
||||
return syncContext;
|
||||
}
|
||||
|
||||
async function pullSync(syncContext) {
|
||||
async function pullChanges(syncContext) {
|
||||
let atLeastOnePullApplied = false;
|
||||
|
||||
while (true) {
|
||||
@@ -175,7 +175,7 @@ async function pullSync(syncContext) {
|
||||
log.info("Finished pull");
|
||||
}
|
||||
|
||||
async function pushSync(syncContext) {
|
||||
async function pushChanges(syncContext) {
|
||||
let lastSyncedPush = getLastSyncedPush();
|
||||
|
||||
while (true) {
|
||||
|
||||
Reference in New Issue
Block a user