Skip to content

Fix/tab controller safe area and indicator width #1923

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 7, 2022

Conversation

M-i-k-e-l
Copy link
Collaborator

Description

TabController - support safe area and constant indicator width

Changelog

Fixes #1746 - TabController - support safe area (useSafeArea) and constant indicator width (indicatorWidth)

return Constants.windowWidth - (useSafeArea && Constants.isIphoneX ? left + right : 0);
};

const [screenWidth, setScreenWidth] = useState<number>(getScreenWidth());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a little weird the method getScreenWidth is above the useState.
I suggest moving the function out of the component code, nothing fancy, it can be top/bottom of the file

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@M-i-k-e-l M-i-k-e-l requested a review from ethanshar April 3, 2022 10:01
@ethanshar ethanshar merged commit 3403c0d into master Apr 7, 2022
@M-i-k-e-l M-i-k-e-l deleted the fix/tab-controller-safe-area-and-indicator-width branch April 7, 2022 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TabBar works incorrect after rotating screen
2 participants