Skip to content

fix: ensure language is initialized on app startup and applied before navigating to privacy screen#1316

Open
pradhyumna186 wants to merge 1 commit into
Greenstand:masterfrom
pradhyumna186:fix/language-initialization-and-race-condition
Open

fix: ensure language is initialized on app startup and applied before navigating to privacy screen#1316
pradhyumna186 wants to merge 1 commit into
Greenstand:masterfrom
pradhyumna186:fix/language-initialization-and-race-condition

Conversation

@pradhyumna186

@pradhyumna186 pradhyumna186 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

… navigation

Issues Fixed:

  1. App never reads saved language preference on startup
  2. Race condition: app navigates before locale change is applied

Solution:

  • Root.kt: Call applyCurrentLanguage() in startup LaunchedEffect
  • LanguageSelectScreen.kt: Use LanguageSwitcher.languageChangeComplete StateFlow to wait for language change before navigating

Thank you for opening a Pull Request!

Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open a GitHub issue as a bug/feature request before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests are added/updated (if necessary)
  • Ensure the linter passes (./codeAnalysis to automatically apply formatting/linting)
  • Appropriate docs were updated (if necessary)

📸 Proof of change (REQUIRED)

Every PR must include a screen recording / video showing the change working.
UI changes must also include before/after screenshots.
Just drag-and-drop the files into the boxes below — GitHub will upload them.
PRs without the required media will be flagged automatically and cannot be merged.

🎥 Screen recording / video (always required)

🖼️ Screenshots (required for any UI change)

Before After
  • This change has no user-visible / UI effect (refactor, docs, CI, etc.), so screenshots are not applicable.
    • A maintainer may also apply the non-ui label. A video is still required even for non-UI changes.
      @
Screenshot_20260713_205751

Fixes #<1270> 🦕

… navigation

Issues Fixed:
1. App never reads saved language preference on startup
2. Race condition: app navigates before locale change is applied

Solution:
- Root.kt: Call applyCurrentLanguage() in startup LaunchedEffect
- LanguageSelectScreen.kt: Use LanguageSwitcher.languageChangeComplete StateFlow to wait for language change before navigating
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

✅ Thanks @pradhyumna186 — required media detected. Nothing more needed here!

@pradhyumna186 pradhyumna186 changed the title fix: ensure language is initialized on app startup and applied before… fix: ensure language is initialized on app startup and applied before navigating to privacy screen Jul 14, 2026
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.

1 participant