fix non disappearing persistent toast

This commit is contained in:
zadam
2019-10-28 20:26:40 +01:00
parent 5bba18191f
commit c4d5060a0b
5 changed files with 15 additions and 3 deletions

View File

@@ -117,6 +117,8 @@ async function doLogin() {
}
async function pullSync(syncContext) {
let appliedPulls = 0;
while (true) {
const lastSyncedPull = await getLastSyncedPull();
const changesUri = '/api/sync/changed?lastSyncId=' + lastSyncedPull;
@@ -150,9 +152,13 @@ async function pullSync(syncContext) {
}
await setLastSyncedPull(rows[rows.length - 1].sync.id);
appliedPulls += rows.length;
}
ws.syncPullFinished();
if (appliedPulls > 0) {
ws.syncPullFinished();
}
log.info("Finished pull");
}