Skip to content

fix(ios): follow system appearance when theme=system#10275

Merged
originalix merged 1 commit intoOneKeyHQ:xfrom
0xchloe996:fix/ios-auto-theme-follow-system
Feb 24, 2026
Merged

fix(ios): follow system appearance when theme=system#10275
originalix merged 1 commit intoOneKeyHQ:xfrom
0xchloe996:fix/ios-auto-theme-follow-system

Conversation

@0xchloe996
Copy link
Copy Markdown
Contributor

@0xchloe996 0xchloe996 commented Feb 14, 2026

Problem:

  • When user selects Theme=System/Auto, app doesn\x27t follow iOS system appearance.
  • Root cause: we were forcing iOS UIUserInterfaceStyle to the resolved light/dark variant, which can make Appearance.getColorScheme() reflect the forced override.

Fix:

  • Thread raw theme setting (light/dark/system) alongside resolved theme variant.
  • On iOS, when themeSetting==="system", call setUserInterfaceStyle("unspecified") so the app follows the OS.

Files:

  • packages/shared/src/modules3rdParty/rootview-background/index.native.tsx
  • packages/components/src/layouts/Navigation/Navigator/NavigationContainer.tsx
  • packages/kit/src/provider/ThemeProvider.tsx
  • plus small type/context plumbing.

Open with Devin

@revan-zhang
Copy link
Copy Markdown
Contributor

revan-zhang commented Feb 14, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

@huhuanming huhuanming enabled auto-merge (squash) February 15, 2026 02:46
auto-merge was automatically disabled February 24, 2026 13:58

Head branch was pushed to by a user without write access

@0xchloe996 0xchloe996 force-pushed the fix/ios-auto-theme-follow-system branch 3 times, most recently from d440576 to c3448e6 Compare February 24, 2026 14:09
When user theme setting is system, avoid forcing iOS UIUserInterfaceStyle to light/dark.

- Pass through raw theme setting alongside resolved theme variant
- On iOS, set userInterfaceStyle to unspecified in system mode so Appearance reflects the real OS setting
@0xchloe996 0xchloe996 force-pushed the fix/ios-auto-theme-follow-system branch from c3448e6 to 47fdf91 Compare February 24, 2026 14:26
@originalix originalix merged commit 972677b into OneKeyHQ:x Feb 24, 2026
6 checks passed
PatrickChoo pushed a commit to PatrickChoo/app-monorepo that referenced this pull request Mar 10, 2026
When user theme setting is system, avoid forcing iOS UIUserInterfaceStyle to light/dark.

- Pass through raw theme setting alongside resolved theme variant
- On iOS, set userInterfaceStyle to unspecified in system mode so Appearance reflects the real OS setting

Co-authored-by: onekey <onekey@onekeydeMacBook-Air.local>
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.

5 participants