pmartin/plop-reader

Entries added during a sync are never fetched

Closed this issue · 0 comments

To reproduce:

  • Start a sync on the ereader
  • While the sync is running, add an entry to wallabag (using the web interface, for instance)
  • When the sync is finished, run another sync on the ereader
  • The entry added on the server doesn't appear on the device

Probable cause:

  • After finshing syncing, the ereader app stores the current timestamp
  • On the next sync, only entries more recent than this timestamp are synced (considered when it comes to saving to local DB)

Possible fix:

  • Save current timestamp at the beginning of the sync and not at its end
  • In addition, eventually: accept a few seconds before that timestamp, when comparing entries dates (just in case the server's time is off by a few seconds)

Note: this timestamp is used on the ereader's side purely as an optimization. It's here to avoid comparing all entries fetched from the API with the corresponding entries in DB, and only doing this comparison for recent entries.