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

Apply user dark mode preference to splashscreen #1718

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

seve-andre
Copy link
Contributor

What I have done and why
As previously attempted here, this PR aims to align the splash screen with the user's dark mode preference. However, this solution only works for API >= 31 (see screen recordings below).

API >= 31
API-31-nia.webm
API <= 30
API-30-nia.webm

Related issues/PRs:
#633
#646

@mlykotom
Copy link
Contributor

There are conflicts now with the PR because of work that I did in the past. But, it will actually simplify your work here, because the only thing now needed is to call the setAppTheme

@@ -86,6 +90,7 @@ class MainActivity : ComponentActivity() {
darkTheme = resources.configuration.isSystemInDarkTheme,
androidTheme = Loading.shouldUseAndroidTheme,
disableDynamicTheming = Loading.shouldDisableDynamicTheming,
shouldFollowSystemTheme = Loading.shouldFollowSystemTheme,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm confused why should Follow System Theme need in here? Wouldn't the System Follow Dark Theme being considered before in isSystemInDarkTheme logic?

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.

3 participants