platelet-app/platelet

Dashboard doesn't load if the app is opened while offline

Closed this issue · 0 comments

While offline is supported in the app, it will get stuck loading if opened while the user is already offline.

This is because it waits for the datastore ready event before making queries.

The dashboard will need to make use of observers so that it can load immediately and update itself as data is synced. Alternatively observeQuery could be used, but this could be tricky because of the way the dashboard currently queries data when certain filters are used and aws-amplify/amplify-js#9682 will need to be worked around.

An alternative is to wait for the datastore network offline event and dispatch ready status at the same time, but this can be unreliable: aws-amplify/amplify-js#9035