Commit e39c51c
committed
fix(auth): skip network retries during offline cold launch
Check connectivity before retrying getUserFlags(), updateUserProfile(),
and savePrefs() in login(). When offline during a soft login (app
restart), flags resolve to null immediately and the existing local
fallback sets AuthState.Ready from cached DataStore — eliminating the
~6s spinner caused by 3 failed retries with 2s delays. Interactive
logins still always attempt the network fetch. Data refreshes on
reconnect via RealSessionController.
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>1 parent 68dfd3b commit e39c51c
1 file changed
Lines changed: 14 additions & 4 deletions
File tree
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| |||
192 | 194 | | |
193 | 195 | | |
194 | 196 | | |
195 | | - | |
196 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
197 | 203 | | |
198 | 204 | | |
199 | 205 | | |
| |||
228 | 234 | | |
229 | 235 | | |
230 | 236 | | |
231 | | - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
232 | 243 | | |
233 | | - | |
234 | 244 | | |
235 | 245 | | |
236 | 246 | | |
| |||
0 commit comments