Skip to content

fix(assistant): resolve LocalContext resource query in LaunchedEffect#16466

Open
joshtrichards wants to merge 1 commit intomasterfrom
jtr/fix-assistant-LaunchedEffect
Open

fix(assistant): resolve LocalContext resource query in LaunchedEffect#16466
joshtrichards wants to merge 1 commit intomasterfrom
jtr/fix-assistant-LaunchedEffect

Conversation

@joshtrichards
Copy link
Member

@joshtrichards joshtrichards commented Feb 7, 2026

Fixes lint error: "Querying resource values using LocalContext.current"

Extract string resource retrieval outside LaunchedEffect to ensure proper recomposition on configuration changes. This resolves the LocalContextGetResourceValueCall lint error and prevents stale snackbar messages when configuration changes occur (e.g., language switches, dark mode toggles).

The snackbar message string is now computed in the composable body where LocalContext.current changes trigger recomposition, ensuring the LaunchedEffect always receives up-to-date string values.

  • Tests written, or not not needed

Extract string resource retrieval outside LaunchedEffect to ensure
proper recomposition on configuration changes. This resolves the LocalContextGetResourceValueCall lint warning and prevents stale snackbar messages when configuration changes occur (e.g., language switches, dark mode toggles).

The snackbar message string is now computed in the composable body where LocalContext.current changes trigger recomposition, ensuring
the LaunchedEffect always receives up-to-date string values.

Fixes lint error: "Querying resource values using LocalContext.current"

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards marked this pull request as ready for review February 7, 2026 15:41
@github-actions
Copy link

github-actions bot commented Feb 7, 2026

Codacy

SpotBugs

CategoryBaseNew
Bad practice4242
Correctness7474
Dodgy code257257
Experimental11
Internationalization77
Malicious code vulnerability22
Multithreaded correctness3434
Performance4343
Security1818
Total478478

@github-actions
Copy link

github-actions bot commented Feb 7, 2026

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/16466.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@github-actions
Copy link

github-actions bot commented Feb 7, 2026

blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant