Commit 11ff7d5
authored
## Description
Follow-up to
#4242.
Ensures that `onLoaded` callback is called even if bitmap was null.
Closes
software-mansion/react-native-screens-labs#1589.
### Reasoning
E.g. in Stack v5 toolbar menu item implementation when update via view
command contains icon, we delay updating the menu item until we load the
image. We don't want to miss the onLoaded callback, otherwise we won't
update the menu item at all.
## Changes
- make `onLoaded`'s result in `ImageLoader.loadImage` and
`ImageLoader.loadImageInternal` nullable `Drawable` (`Drawable?`)
- no changes were required in existing code that uses the image loader
## Before & after - visual documentation
N/A
## Test plan
Ensure that images still load in tabs, stack v5.
## Checklist
- [x] Ensured that CI passes
1 parent 926286f commit 11ff7d5
1 file changed
Lines changed: 4 additions & 2 deletions
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
0 commit comments