The DashboardView is always in the isLoading state because there is no error handling if the loading fails
In DashboardViewModel function getMaintenanceEvents the line let 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 a ProgressView
Expected behavior
After there is an error show the empty screen, and make isLoading false, so that it isn't infinitely showing a ProgeressView
Screenshots
If there is an error set isLoading to false 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 tofalse`
Describe the bug
DashboardView
is always in theisLoading
state because there is no error handling if the loading failsDashboardViewModel
functiongetMaintenanceEvents
the linelet querySnapshot = try? await docRef.getDocuments()
doesn't handle any errors and it shouldTo Reproduce
Steps to reproduce the behavior:
DashboardView
loads with aProgressView
Expected behavior
isLoading
false, so that it isn't infinitely showing aProgeressView
Screenshots
isLoading
tofalse
and show the empty view (which will be implemented in #286Device Info (please complete the following information):
Additional Context
isLoading to
false`