Repository navigation
fix(ui): lint-clean LogsScreen — composition-safe resources and remembered state - #34
Merged
Merged
Conversation
…bered state lintDebug aborts the build with three errors introduced with the diagnostics screen: - context.getString() inside the composable (share subject and chooser label) trips LocalContextGetResourceValueCall — resolve both strings with stringResource() in composition instead; - derivedStateOf without remember (UnrememberedMutableState) rebuilt its state object on every recomposition — wrap it in remember. Verified locally: :app:lintDebug passes with 0 errors; unit tests green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
CIandReleaseworkflows fail onmain(runs 43223332988 / 43223333184):./gradlew testaborts at:app:lintDebugwith 3 errors introduced with the diagnostics screen (#33):LogsScreen.kt:103—context.getString(R.string.logs_share_subject)inside the composable tripsLocalContextGetResourceValueCall(not configuration-aware).LogsScreen.kt:107— same check for the chooser label.LogsScreen.kt:73—derivedStateOfcreated withoutremembertripsUnrememberedMutableState(a fresh state object on every recomposition; also breaks the tail auto-scroll once recomposed).Fix
stringResource()and capture them in theonClicklambda.derivedStateOfinremember.Verification
:app:lintDebug— 0 errors locally../gradlew test -x assembleRelease -x nativeRegressions— green locally (the two excluded tasks are environment-dependent: release APK packaging and a proot/seccomp integration test that this sandbox kills with SIGSYS; both passed on CI for the previous PR).LogsScreen.kt.