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

Proposed rule: Don't use Locale.getDefault() in a @Composable context #373

Open
yogurtearl opened this issue Jul 17, 2024 · 1 comment
Open
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@yogurtearl
Copy link

Add a rule for something along the lines of:

"Don't call Locale.getDefault() in a @Composable context, use LocalConfiguration.current.locales instead."

Calling Locale.getDefault() won't recompose if the locale changes (Configuration change),
Also, LocalConfiguration.current.locales works better for previews and tests.

@ZacSweers
Copy link
Collaborator

PR welcome!

@ZacSweers ZacSweers added the enhancement New feature or request label Jul 29, 2024
@ZacSweers ZacSweers added the help wanted Extra attention is needed label Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants