Commit 1a9c4c0
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 b0a6386 commit 1a9c4c0
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 | |
|---|---|---|---|
| |||
529 | 529 | | |
530 | 530 | | |
531 | 531 | | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
| 532 | + | |
537 | 533 | | |
538 | 534 | | |
539 | 535 | | |
540 | 536 | | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
541 | 543 | | |
542 | 544 | | |
543 | 545 | | |
| |||
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 | |
|---|---|---|---|
| |||
8615 | 8615 | | |
8616 | 8616 | | |
8617 | 8617 | | |
| 8618 | + | |
| 8619 | + | |
| 8620 | + | |
| 8621 | + | |
| 8622 | + | |
| 8623 | + | |
8618 | 8624 | | |
8619 | 8625 | | |
8620 | 8626 | | |
| |||
9457 | 9463 | | |
9458 | 9464 | | |
9459 | 9465 | | |
| 9466 | + | |
| 9467 | + | |
| 9468 | + | |
| 9469 | + | |
| 9470 | + | |
| 9471 | + | |
| 9472 | + | |
| 9473 | + | |
9460 | 9474 | | |
9461 | 9475 | | |
9462 | 9476 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8391 | 8391 | | |
8392 | 8392 | | |
8393 | 8393 | | |
| 8394 | + | |
| 8395 | + | |
| 8396 | + | |
| 8397 | + | |
| 8398 | + | |
| 8399 | + | |
8394 | 8400 | | |
8395 | 8401 | | |
8396 | 8402 | | |
| |||
9095 | 9101 | | |
9096 | 9102 | | |
9097 | 9103 | | |
| 9104 | + | |
| 9105 | + | |
| 9106 | + | |
| 9107 | + | |
| 9108 | + | |
| 9109 | + | |
| 9110 | + | |
9098 | 9111 | | |
9099 | 9112 | | |
9100 | 9113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8606 | 8606 | | |
8607 | 8607 | | |
8608 | 8608 | | |
| 8609 | + | |
| 8610 | + | |
| 8611 | + | |
| 8612 | + | |
| 8613 | + | |
| 8614 | + | |
8609 | 8615 | | |
8610 | 8616 | | |
8611 | 8617 | | |
| |||
9310 | 9316 | | |
9311 | 9317 | | |
9312 | 9318 | | |
| 9319 | + | |
| 9320 | + | |
| 9321 | + | |
| 9322 | + | |
| 9323 | + | |
| 9324 | + | |
| 9325 | + | |
9313 | 9326 | | |
9314 | 9327 | | |
9315 | 9328 | | |
| |||
0 commit comments