Commit 10bbcb7
committed
Support PlatformColor in Android StatusBar backgroundColor
Passing a PlatformColor to StatusBar.backgroundColor previously tripped
an invariant in _updatePropsStack because processColor returns an object
for PlatformColor and the native setColor TurboModule only accepted a
number.
Adds a setColorObject TurboModule method that accepts a resource-paths
object and resolves it on the native side via ColorPropConverter.getColor.
StatusBar.js now dispatches to setColor for numeric colors and to
setColorObject for PlatformColor values.
Fixes #484021 parent 083fd99 commit 10bbcb7
6 files changed
Lines changed: 79 additions & 6 deletions
File tree
- packages/react-native
- Libraries/Components/StatusBar
- ReactAndroid/src/main/java/com/facebook/react/modules/statusbar
- src/private/specs_DEPRECATED/modules
- scripts/cxx-api/api-snapshots
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
| 480 | + | |
485 | 481 | | |
486 | 482 | | |
487 | 483 | | |
488 | 484 | | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
489 | 491 | | |
490 | 492 | | |
491 | 493 | | |
| |||
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
83 | 102 | | |
84 | 103 | | |
85 | 104 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
21 | 29 | | |
22 | 30 | | |
23 | 31 | | |
| |||
47 | 55 | | |
48 | 56 | | |
49 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
50 | 62 | | |
51 | 63 | | |
52 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8591 | 8591 | | |
8592 | 8592 | | |
8593 | 8593 | | |
| 8594 | + | |
| 8595 | + | |
| 8596 | + | |
| 8597 | + | |
| 8598 | + | |
| 8599 | + | |
8594 | 8600 | | |
8595 | 8601 | | |
8596 | 8602 | | |
| |||
9433 | 9439 | | |
9434 | 9440 | | |
9435 | 9441 | | |
| 9442 | + | |
| 9443 | + | |
| 9444 | + | |
| 9445 | + | |
| 9446 | + | |
| 9447 | + | |
| 9448 | + | |
| 9449 | + | |
9436 | 9450 | | |
9437 | 9451 | | |
9438 | 9452 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8367 | 8367 | | |
8368 | 8368 | | |
8369 | 8369 | | |
| 8370 | + | |
| 8371 | + | |
| 8372 | + | |
| 8373 | + | |
| 8374 | + | |
| 8375 | + | |
8370 | 8376 | | |
8371 | 8377 | | |
8372 | 8378 | | |
| |||
9071 | 9077 | | |
9072 | 9078 | | |
9073 | 9079 | | |
| 9080 | + | |
| 9081 | + | |
| 9082 | + | |
| 9083 | + | |
| 9084 | + | |
| 9085 | + | |
| 9086 | + | |
9074 | 9087 | | |
9075 | 9088 | | |
9076 | 9089 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8582 | 8582 | | |
8583 | 8583 | | |
8584 | 8584 | | |
| 8585 | + | |
| 8586 | + | |
| 8587 | + | |
| 8588 | + | |
| 8589 | + | |
| 8590 | + | |
8585 | 8591 | | |
8586 | 8592 | | |
8587 | 8593 | | |
| |||
9286 | 9292 | | |
9287 | 9293 | | |
9288 | 9294 | | |
| 9295 | + | |
| 9296 | + | |
| 9297 | + | |
| 9298 | + | |
| 9299 | + | |
| 9300 | + | |
| 9301 | + | |
9289 | 9302 | | |
9290 | 9303 | | |
9291 | 9304 | | |
| |||
0 commit comments