Basic-Car-Maintenance
Basic-Car-Maintenance copied to clipboard
BUG - DashboardView Loads Infinitly
Describe the bug
- The
DashboardView
is always in theisLoading
state because there is no error handling if the loading fails - In
DashboardViewModel
functiongetMaintenanceEvents
the linelet querySnapshot = try? await docRef.getDocuments()
doesn't handle any errors and it should
To Reproduce
Steps to reproduce the behavior:
- Run the app
- The
DashboardView
loads with aProgressView
Expected behavior
- After there is an error show the empty screen, and make
isLoading
false, so that it isn't infinitely showing aProgeressView
Screenshots
- If there is an error set
isLoading
tofalse
and show the empty view (which will be implemented in #286
Device Info (please complete the following information):
- Device: iPhone 15 Pro Simulator
- OS: iOS 17.5
- App Version v1.0(1)
Additional Context
- Don't make an empty view because that's in a different issue, change
isLoading to
false`