Commit 50941ed
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 4c9cee7 commit 50941ed
1 file changed
Lines changed: 6 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
| 194 | + | |
205 | 195 | | |
206 | 196 | | |
207 | 197 | | |
208 | 198 | | |
209 | 199 | | |
| 200 | + | |
| 201 | + | |
210 | 202 | | |
211 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
212 | 206 | | |
213 | 207 | | |
214 | 208 | | |
| |||
261 | 255 | | |
262 | 256 | | |
263 | 257 | | |
264 | | - | |
265 | 258 | | |
266 | 259 | | |
267 | 260 | | |
| |||
0 commit comments