Commit 2eed7d3
authored
feat(Android): Make commit hook condition for resetting screen size more general (#3508)
Closes
software-mansion/react-native-screens-labs#598
## Description
This PR aims to generalize the condition in
RNSScreenShadowNodeCommitHook to also include the screen resize, without
orientation change. Let's discuss the change & decide how "general"
should it be.
Even when triggering the mechanism on every screen resize, this
shouldn't be a problem, since the change is still rare.
## Changes
Modified the screen size reset condition in
RNSScreenShadowNodeCommitHook
## Before & After
| Before | After |
| --- | --- |
| <video
src="https://github.com/user-attachments/assets/4f4f562c-dafb-4881-9d27-9439d1375d34"
/> | <video
src="https://github.com/user-attachments/assets/d136bf0b-b87f-4ff9-866d-e5a4199be39c"
/> |
## Test code and steps to reproduce
Use Test2933 & try split screen, floating window.1 parent 24af933 commit 2eed7d3
2 files changed
Lines changed: 15 additions & 11 deletions
File tree
- common/cpp/react/renderer/components/rnscreens
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
Lines changed: 12 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
| |||
0 commit comments