Skip to content
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

fix: apply initial navigation bar content color #1344

Conversation

burakgormek
Copy link
Contributor

Description

Initial navigation bar content color is not applied. Actually don't know the technical reason behind it.
It works If you edit the 'navigationBarColor' value and save it to a different value while the app is open.

Test code and steps to reproduce

Test860.tsx.

Change navigationBar color to yellow and you will see the navigation bar content color is not applied on the first app opening.

It should set the light background to dark content, but it is setting the light background to light content.

Checklist

  • Included code example that can be used to test this change
  • Ensured that CI passes

@kacperkapusciak
Copy link
Member

Hi @burakgormek 👋
Thanks for opening the PR! 🎉
I can't seem to reproduce the wrong behavior mentioned in the PR. Could you upload a video or screenshots showing before and after the change is applied?

On my machine it looks like this:
Screenshot of the app right after the opening without applied changes 👇

image

and after 👇

image

Cheers

@burakgormek
Copy link
Contributor Author

Interesting 🤔

I can't test this on real device, don't have android phone.
This is the result on emulator:

Before PR:

before.mov

After PR:

after.mov

I just changed Test860.tsx > navigationBarColor to yellow.

I thought it was a cache issue beacuse I was trying to implement navigationBarStyle but I just git cloned from start and installed fresh TestsExample app.

@kacperkapusciak
Copy link
Member

@burakgormek I'm okay with adding this because runOnUIThread can help and won't break anything in this context.

Still, it's so weird that I can't reproduce this.

Thanks 🎉

@kacperkapusciak kacperkapusciak merged commit da080e3 into software-mansion:main Feb 28, 2022
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.

2 participants