Skip to content

Conversation

ofcljaved
Copy link

PR Description

This PR resolves the issue #104 where the app fails to update its theme when the user's system theme changes. Previously, the app only responded to theme toggling via the custom dark mode button but did not properly handle system-level theme changes.

Changes Made:

  1. Replaced useColorScheme from react-native with useColorScheme from nativewind to better manage theme state.
  2. Added useEffect to handle system theme changes:
    -- This ensures that when App get out of focus then it still persist the current theme
  3. Updated imports and logic to align with the new implementation.

Impact:
The app now correctly updates its theme when the user changes their system theme.
Ensures consistency between the app's theme and the system theme.

@akash3gtm
Copy link
Contributor

Thank you for the contribution.
However we believe the other solution was more efficient as given in PR.

Closing this for the time being.

@akash3gtm akash3gtm closed this Feb 14, 2025
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