[Survey list] "No surveys available" shown on slow connections
The survey list eventually appears, but this message is misleading. Perhaps we should show a spinner below offline surveys while the connection isn't available?
@shobhitagarwal1612 Tried using slow internet speed, spinner there for 8 secs, and then the real data came up. Hence, working as required.
Suggested approach:
- If the last emitted state by
getSurveyListis an empty list, we can add a delay of 5sec or so, and then if any new data then update the UI else empty list UI. - Do we need to have any retry or refresh button?
If the last emitted state by getSurveyList is an empty list, we can add a delay of 5sec or so, and then if any new data then update the UI else empty list UI.
If we are offline, then we should directly load from getSurveyList. If online, then we should check if offline surveys are available or not. If not, then wait for remote results to be returned before dismissing the spinner. Thoughts?
Do we need to have any retry or refresh button?
No, we don't a refresh button. The data is auto-refreshed as soon as the remote survey list is updated.