Skip to content

Theme does not change properly on startup if OS theme is different to app selected theme #700

Closed

Description

@nickmccomb

What happened?

When a user has selected a theme in-app that differs to their device theme, the app starts up and the colours are all wrong.

Steps to Reproduce

  1. Select a theme in app that differs from the OS theme
  2. Force close the app
  3. Open the app
  4. When we set the theme the user has selected as soon as the app runs, the colours are all wrong.

I feel like this is a race condition between Uniwind Pro setting the theme natively to the OS theme, and then the app setting the theme to what the user had selected on a previous app open.

Snack or Repository Link (Optional)

No response

Uniwind version

latest

React Native Version

0.86.3

Platforms

iOS

Expo

Yes

Additional information 〰

Activity

  1. self-assigned this
    on Sep 30, 2026
  2. nickmccomb commented on Oct 1, 2026

    @nickmccomb
    Author

    @jpudysz flipping the theme on startup behind the splash somewhat solves the issue, but there are still some components that don't get set to the correct theme. It's different components every time, so i'm guessing there's still a bit of a race condition when doing it that way as well. Delaying splash to flip the theme isn't a great solution either as we want our splash to go away as fast as possible without delaying it.

  3. jpudysz commented on Oct 1, 2026

    @jpudysz
    Collaborator

    Yes, it's a race condition. Setting theme in requestIdleCallback could help, but I was able to repro and should fix it today.

  4. nickmccomb commented on Oct 1, 2026

    @nickmccomb
    Author

    @jpudysz legend!! Thank you 🐐

  5. github-actions commented on Oct 1, 2026

    @github-actions
    Contributor

    New release is published: https://docs.uniwind.dev/pro/changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions