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

Force AppLogo refresh when system theme changes #5585

Merged
merged 3 commits into from
Jul 15, 2022
Merged

Conversation

keianhzo
Copy link
Contributor

The AppLogo component is not re-rendered when a system theme update happens. It only re-rendered when closing the preferences in the hub as that conditionally renders UI. This means that in any situations where the logo is visible and the system theme is updated we don't update the logo. As far as I know this only happens in the home screen.

This PR forces a AppLogo re-render when the system theme is updated by using the already existing useDarkMode hook. It also removes the get-app-logo util as it's only been used for the logo update but we get the same information from the hook.

@keianhzo
Copy link
Contributor Author

Adding you @brianpeiris as you were the last one updating that code.

src/react-components/misc/AppLogo.js Outdated Show resolved Hide resolved
src/react-components/styles/theme.js Outdated Show resolved Hide resolved
Copy link
Contributor

@brianpeiris brianpeiris left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

None yet

2 participants