Commit ac02e81
committed
fix(mobile): show cached note counts instantly on app restart
Fixes #39
Load note counts from AsyncStorage immediately on mount to prevent showing "0" for several seconds while API loads. The app now displays last known counts instantly, then updates with fresh data from the API in the background.
Flow:
- On mount: Load cached counts from AsyncStorage (instant display)
- In background: Fetch fresh counts from API
- On success: Update display and save to AsyncStorage for next launch1 parent 7c0c1ca commit ac02e81
1 file changed
+33
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
135 | 156 | | |
136 | 157 | | |
137 | 158 | | |
| |||
177 | 198 | | |
178 | 199 | | |
179 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
180 | 213 | | |
181 | 214 | | |
182 | 215 | | |
| |||
0 commit comments