fix: do not update lastSynced time on SSE sync

we won't be updating lastSynced time because it can
cause the lastSynced time to move ahead of any last edited
(but unsynced) note resulting in edited notes not getting synced.
This commit is contained in:
thecodrr
2021-02-22 09:33:30 +05:00
parent 465b651587
commit df4c98b27b

View File

@@ -98,10 +98,14 @@ export default class Sync {
// check for conflicts and throw
// await this._db.conflicts.check();
// update our lastSynced time
if (serverResponse.lastSynced) {
await this._db.context.write("lastSynced", serverResponse.lastSynced);
}
// TODO test this.
// we won't be updating lastSynced time here because
// it can cause the lastSynced time to move ahead of any
// last edited (but unsynced) time resulting in edited notes
// not getting synced.
// if (serverResponse.lastSynced) {
// await this._db.context.write("lastSynced", serverResponse.lastSynced);
// }
}
async _send(data, token) {