Commit 37264cb
committed
[fix] Image: image LOADED state is only captured initially
If the Image component is rendered with a `null` source, and consecutively
updated with actual source url that was already loaded, it would fail to
pic kup the change - `state` would be `IDLE` for a brief moment and
this would cause a small flicker when the image renders
Let's always start from IDLE state, and update `shouldDisplaySource`
condition to be based on `ImageLoader.has` cache or not1 parent 8aae58e commit 37264cb
1 file changed
+6
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
| 214 | + | |
225 | 215 | | |
226 | 216 | | |
227 | 217 | | |
228 | 218 | | |
229 | 219 | | |
| 220 | + | |
| 221 | + | |
230 | 222 | | |
231 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
232 | 226 | | |
233 | 227 | | |
234 | 228 | | |
| |||
281 | 275 | | |
282 | 276 | | |
283 | 277 | | |
284 | | - | |
285 | 278 | | |
286 | 279 | | |
287 | 280 | | |
| |||
0 commit comments