Commit 4c94d3a
chore(examples): add patch to
## Description
Add patch to MainActivity to enable predictive back gesture
This is needed, because for some reason, currently the
`OnBackPressedCallback` from `ReactActivity` is added after the one from
fragment manager, effectively preventing native dismiss & navigation
from working properly.
This should be either fixed directly on RN side or we'll need to make it
into an installation step / alternatively we can create a hacky
workaround & handle this on our end.
This is added only to FabricExample because we do plan to support
predictive back gesture only on new architecture with new stack
implementation.
## Changes
This patch uses reflection to disable the `ReactAcctivity`'s
`OnBackPressedCallback`.
It effectively disables `BackPressed` API from `react-native`. We should
be
fine with it for now.
## Checklist
- [ ] Included code example that can be used to test this change.
- [ ] Updated / created local changelog entries in relevant test files.
- [ ] For visual changes, included screenshots / GIFs / recordings
documenting the change.
- [ ] For API changes, updated relevant public types.
- [ ] Ensured that CI passes
---------
Co-authored-by: Krzysztof Ligarski <63918941+kligarski@users.noreply.github.com>MainActivity to enable predictive back gesture (#3630)1 parent 4123e4b commit 4c94d3a
1 file changed
Lines changed: 13 additions & 0 deletions
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
28 | 41 | | |
29 | 42 | | |
30 | 43 | | |
| |||
0 commit comments