xMartin / grouptabs

Mobile Web App to organize payments in dynamic groups of people.
https://grouptabs.net
GNU General Public License v3.0
42 stars 11 forks source link

Reloading app with no IndexedDB available might show error temporily due to timeout #203

Open xMartin opened 2 years ago

xMartin commented 2 years ago

No IndexedDB available usually means Firefox private mode. Tab IDs are present in local storage but data needs to be fetched from backend.

Error: "Error: Tab data missing. Are you offline? Try refreshing." or, if on tabs view, tab names might load one by one.

This happens due to possible timeout cancelling the initial replication leaving the tab data in incomplete state (no info doc, yet) until syncing ran successfully. initialLoadingDone is true prematurely then.

The initial timeout is useful if data is present locally, so we show the old data and fetch in the background to not make the user wait for too long if network is slow. But if there's no data at all locally, it doesn't make sense. Should we distinguish between no data present and some?