-
-
Notifications
You must be signed in to change notification settings - Fork 527
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(iOS): change implementation of calculating status bar, refactor m…
…ethods used on header height change (#1917) ## Description It looks that sometimes when you're most likely on the first screen the initial header height (taken from the `getDefaultHeaderHeight` method) stays and is not being updated from the `onHeaderHeightChange` event. Also, when user hides the status bar it wasn't counted to the final value of header height. This PR fixes those problems and also other minor issues, related to the calculating header height. ## Changes - Added calls for calculating header height on setting animated config and changing `statusBarHidden` prop. - Changed implementation of `getCalculatedStatusBarHeightIsModal` method. - Refactorized naming of the methods, related to the header height. - Added asserting modal hierarchy. ## Test code and steps to reproduce You can change `Modals.tsx` file by adding this snippet: ```js const headerHeight = useAnimatedHeaderHeight(); headerHeight.addListener((height) => console.log(height.value)) ``` to the components and listen to the changes in `Modals` example. Then try to hide header in modals - there should be `0` value as a header height. ## Checklist - [X] Included code example that can be used to test this change - [ ] Ensured that CI passes
- Loading branch information
Showing
4 changed files
with
72 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters