Commit 76136ec
fix(assistant): resolve LocalContext resource query in LaunchedEffect
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>1 parent 4e8dad7 commit 76136ec
1 file changed
Lines changed: 4 additions & 3 deletions
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
77 | | - | |
78 | | - | |
79 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
0 commit comments