react-navigation / react-navigation

Routing and navigation for your React Native apps
https://reactnavigation.org
23.33k stars 4.98k forks source link

fix: support custom fontFamily configurations in headerTitleStyle #11880

Closed Kasendwa closed 2 months ago

Kasendwa commented 2 months ago

Passing a custom font for the headerTitleStyle configuration is ignored because the user set values always get overridden by the fonts values from the useTheme() hook.

By changing the order of the values passed to Stylesheet.flatten(), any user passed fontFamily configurations then get retained.

I believe this fixes the issue raised in #11429. It's not just iOS specific; it cuts across all platforms.

github-actions[bot] commented 2 months ago

Hey @Kasendwa! Thanks for opening your first pull request in this repo. If you haven't already, make sure to read our contribution guidelines.

github-actions[bot] commented 2 months ago

Hey @autofix-ci[bot]! Thanks for opening your first pull request in this repo. If you haven't already, make sure to read our contribution guidelines.

codecov-commenter commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 77.14%. Comparing base (3799b16) to head (5104ced).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #11880 +/- ## ======================================= Coverage 77.14% 77.14% ======================================= Files 210 210 Lines 6270 6270 Branches 2474 2474 ======================================= Hits 4837 4837 Misses 1379 1379 Partials 54 54 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

netlify[bot] commented 2 months ago

Deploy Preview for react-navigation-example ready!

Name Link
Latest commit c1ca459e8bde63f259e302bf262b18bb25945fe9
Latest deploy log https://app.netlify.com/sites/react-navigation-example/deploys/65ed61e3a6699f0008253ed8
Deploy Preview https://deploy-preview-11880--react-navigation-example.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 2 months ago

Deploy Preview for react-navigation-example ready!

Name Link
Latest commit 5104ced35734a52bb97710455426903c86243f55
Latest deploy log https://app.netlify.com/sites/react-navigation-example/deploys/65edc0542c828200082204ad
Deploy Preview https://deploy-preview-11880--react-navigation-example.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.