Skip to content

Unwrap OverrideSettingsDesign#132

Merged
Goooler merged 1 commit into
trunkfrom
unwrap-override-settings-design
Apr 24, 2026
Merged

Unwrap OverrideSettingsDesign#132
Goooler merged 1 commit into
trunkfrom
unwrap-override-settings-design

Conversation

@Goooler
Copy link
Copy Markdown
Owner

@Goooler Goooler commented Apr 24, 2026

Refs #119.

This comment was marked as resolved.

@Goooler Goooler force-pushed the unwrap-override-settings-design branch from 94b45c2 to 493555e Compare April 24, 2026 08:43
@Goooler Goooler requested a review from Copilot April 24, 2026 08:43
@Goooler Goooler force-pushed the unwrap-override-settings-design branch from 493555e to de1c660 Compare April 24, 2026 08:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/DesignActivity flow with OverrideSettingsScreen + OverrideSettingsViewModel and a simple BaseActivity host.
  • Remove MutableState-based settings preference helpers/overloads in favor of explicit value/onValueChange APIs.
  • Align MetaFeature settings naming (uiStateconfiguration) 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.

@Goooler Goooler enabled auto-merge (squash) April 24, 2026 08:48
@Goooler Goooler merged commit d3db7c3 into trunk Apr 24, 2026
3 checks passed
@Goooler Goooler deleted the unwrap-override-settings-design branch April 24, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants