EXERLOG / exer_log

exer_log - authored by @KalleHallden

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BUG: Showing the calendar-screen briefly followed by a black-screen with loading indicators before navigating to the workout-screen after login

momshaddinury opened this issue · comments

Steps to reproduce:

  1. Logout if you are logged in.
  2. Close and remove the app from recent. Restart the app
  3. Login with valid credentials
  4. Notice that for a brief period showing the calendar screen followed by a black screen before navigating to the workout screen

Expected: After login, the user should navigate to the Workout screen

Video
https://user-images.githubusercontent.com/26508767/185309898-c277614a-a435-40ea-becf-a15489c75c1d.mp4

@KalleHallden I know what is causing this issue. But before solving it we need to define navigation logic. Right now a user navigates to the workout screen on login/signup.
But I vote for the following:

  1. Upon signing up - Navigate the user to workout screen
  2. Upon login - Navigate the user to calendar screen

Proposed solution:
With the help of a login boolean flag, we can check if a user is logged in or not. So in the splash screen, we can check if the logged-in flag is true. If it is true, we navigate the user to the calendar screen. Otherwise, we navigate the user to the landing screen.

@ckelwin @jorre127 please have a look.

Yeah I agree with that flow of events as well, seems to make the most sense

@dinurymomshad @KalleHallden Yeah that flow seems good to me. Is this issue partially the same as #40? because if so we should probably close that issue.

Most probably. Alright on it. Thanks, @jorre127.

@jorre127 yes, I initially thought the black screen loading was caused by how I was handling authStateChanges(). But this #40 is what causing the issue. I will solve that as well.