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

fix: store theme in app store and secure storage #171

Merged
merged 2 commits into from
Oct 30, 2024
Merged

Conversation

im-adithya
Copy link
Member

Stores theme variable

@@ -72,7 +72,12 @@ export function Settings() {

<TouchableOpacity
className="flex flex-row gap-4"
onPress={toggleColorScheme}
onPress={() => {
useAppStore
Copy link
Contributor

Choose a reason for hiding this comment

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

That feels wrong. Can we move this to a function in the useColorScheme hook? Also shouldn't we use setColorScheme instead of toggle? Otherwise the app store and applied theme could diverge...

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed toggleColorScheme to do this as well, couldn't change setColorScheme as we are using that in layout during loadTheme

app/_layout.tsx Outdated Show resolved Hide resolved
app/_layout.tsx Outdated Show resolved Hide resolved
@reneaaron reneaaron merged commit 87e4431 into master Oct 30, 2024
2 checks passed
reneaaron pushed a commit that referenced this pull request Oct 31, 2024
* fix: store theme in app store and secure storage

* chore: fixes
@im-adithya im-adithya deleted the task-theme branch November 18, 2024 12:29
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