Unwrap OverrideSettingsDesign#132
Merged
Merged
Conversation
94b45c2 to
493555e
Compare
493555e to
de1c660
Compare
There was a problem hiding this comment.
Pull request overview
This PR continues the “Design → @Composable + ViewModel” split (refs #119) by removing the remaining OverrideSettingsDesign wrapper and moving override settings to a pure Compose screen backed by a dedicated OverrideSettingsViewModel.
Changes:
- Replace
OverrideSettingsDesign/DesignActivityflow withOverrideSettingsScreen+OverrideSettingsViewModeland a simpleBaseActivityhost. - Remove
MutableState-based settings preference helpers/overloads in favor of explicitvalue/onValueChangeAPIs. - Align MetaFeature settings naming (
uiState→configuration) to match the override/settings pattern.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/kotlin/com/github/kr328/clash/ui/component/SettingsPreference.kt | Removes MutableState-based helpers/overloads; keeps a single value/onValueChange API surface for preferences. |
| app/src/main/kotlin/com/github/kr328/clash/settings/vm/OverrideSettingsViewModel.kt | Introduces a ViewModel that owns ConfigurationOverride state and implements update actions + persist/reset operations. |
| app/src/main/kotlin/com/github/kr328/clash/settings/vm/MetaFeatureSettingsViewModel.kt | Renames exposed state from uiState to configuration and updates action methods accordingly. |
| app/src/main/kotlin/com/github/kr328/clash/settings/ui/OverrideSettingsScreen.kt | Replaces the old Design wrapper with a Compose screen/content split wired to the new ViewModel and actions interface. |
| app/src/main/kotlin/com/github/kr328/clash/settings/ui/MetaFeatureSettingsScreen.kt | Updates callsites to use configuration and the renamed values parameter in list preference components. |
| app/src/main/kotlin/com/github/kr328/clash/settings/OverrideSettingsActivity.kt | Migrates activity from DesignActivity to BaseActivity and hosts the Compose screen via setContent. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Refs #119.