Refactor Settings shared helpers#732
Open
tigercraft4 wants to merge 2 commits into
Open
Conversation
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.
Summary
Continues #665.
This is the first small SettingsScreen split: it moves shared Settings UI helpers and pure Settings helper logic into sibling files, without changing the section bodies or behavior.
Changes
SettingsComponents.ktfor reusable Settings card/form/disclosure/toggle/row helpers.SettingsLogic.ktfor waist-stepper logic, strap status helpers, sex options, and advanced-disclosure prefs.SettingsScreen.ktas the same screen assembler, now calling the extracted helpers withSettings*names to avoid package-level collisions with similar helpers in other screens.SettingsScreen.ktdrops from about 3121 lines to 2851 lines. This deliberately avoids a larger section move in the same PR.Verification
JAVA_HOME=/opt/homebrew/Cellar/openjdk@21/21.0.11/libexec/openjdk.jdk/Contents/Home ANDROID_HOME=$HOME/Library/Android/sdk ./gradlew --dependency-verification=off :app:compileFullDebugKotlinI also attempted the focused unit tests:
./gradlew --dependency-verification=off :app:testFullDebugUnitTest --tests 'com.noop.ui.SettingsDisclosurePrefsTest' --tests 'com.noop.ui.StrapStatusDetailTest'That currently fails before running the focused tests because
mainhas three fakeDeviceRegistryDaoimplementations missing the newsetModel(id, model)method. That is the existing Android unit-test unblocker covered by #725, not caused by this refactor.