[BUG] Very Quick Ghost UI Flashing When Switching Tabs
Kaz-ookid opened this issue · 0 comments
Description (Actual behavior)
Let's say we enter a tab that has a UI changing depending on the validity of the user's token. We will call UI1
the UI that should show when the user has no valid token, and UI2
the one that shows when the user has a valid token.
When entering one of those tabs (example : Tokens), while having a valid token, we can see the UI1
flashing VERY quickly before seeing the actual meant UI, UI2
.
Expected behavior
UI2
should not flash at all. If the user has a valid token, it should directly have the right UI setup.
How to reproduce
- Create a LAO, Join it with another device, create a
RollCall
, Scan your second device and close theRollCall
- On any device, open the Tokens tab (you may already have experienced a flash)
- Click on the available Token
- Wait a few seconds, then use the back arrow (top left corner)
- Experience a flash.
Front-ends:
- Fe1-Web
- Fe2-Android
Phone AND Emulator
- Not applicable
Back-ends:
- Be1-Go
- Be2-Scala
- Not applicable
Impact
Minor user experience impact.
Possible root cause
When starting a fragment that has shifting UI depending on if the user has a Token or not, the valid token retrieval is too slow. Thus, the UI shows the default setup before changing to the right one.
Maybe have a globally stored variable for the validity of the token, rather than retrieving it at every fragment opening. Maybe also, do not display the UI before the retrieval of the token has been "done".