StanfordBDHG / ENGAGE-HF-iOS

The ENGAGE-HF Application
MIT License
2 stars 1 forks source link

Video list empty right after enrollment #110

Open pauljohanneskraft opened 3 hours ago

pauljohanneskraft commented 3 hours ago

Description

The video list appears empty probably due to a permissions issue after enrolling.

Reproduction

  1. Have a patient invitation code at hand to use in step 4
  2. Open the app in a state where no user is logged in (i.e. either onboarding or account setup visible)
  3. Create a new acccount
  4. Enter the invitation code from step 1
  5. Finish up onboarding, if necessary
  6. Open the videos tab

Expected behavior

The video list should be filled with videos, but it appears empty.

Additional context

Users are only allowed to fetch the videos list when fully enrolled. I suspect that the token is not refreshed "fast enough" right after the enrollUser call to be in effect when fetching the videos. We should make sure to somehow not execute any function calls until the token is refreshed.

If the app is closed during/between any of the above mentioned steps, then it may not behave the same way.

Code of Conduct

pauljohanneskraft commented 3 hours ago

If the "correct solution" is too hard for now, we may also just think about a reloading option (e.g. on pull down of the view) or an automatic refresh when the view is appearing (possibly also only reloading, if it is empty).