citizen-flutter
citizen-flutter copied to clipboard
Act feed keeps showing progress indicator when fetchActions request is complete with `error`
In the ActFeed
, a circular progress indicator is being shown when the length of the actions
list in AppState
is equal to 0. This happens because it assumes that the fetchActions
requests has not yet completed, or else the length of actions
would be > 0. This is unreliable in the case that there are no actions (unlikely) or that the fetchActions
request returns with an error
.
There is already a boolean in AppState
, called isLoading
, that tracks whether or not the request itself has completed. This is should be used to decide whether to show the progress indicator in ActFeed
instead of appState.actions.length
.