Basic-Car-Maintenance icon indicating copy to clipboard operation
Basic-Car-Maintenance copied to clipboard

BUG - DashboardView Loads Infinitly

Open mikaelacaron opened this issue 7 months ago • 2 comments

Describe the bug

  • 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:

  1. Run the app
  2. 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 to false`

mikaelacaron avatar Jul 25 '24 07:07 mikaelacaron