Unwrap HelpDesign#118
Merged
Merged
Conversation
55b9a0a to
0e7787b
Compare
There was a problem hiding this comment.
Pull request overview
Refactors the activity base classes to separate common activity setup from the coroutine-driven Design screen pattern, and “unwraps” Help by making it a plain composable screen hosted directly by HelpActivity (per #119’s direction of splitting Design into composables + state).
Changes:
- Split the old generic
BaseActivity<D>into a non-genericBaseActivity(common setup + broadcasts +startActivityForResult) andDesignActivity<D>(MainScope, events channel,Designwiring). - Migrate existing
Design-based activities to extendDesignActivityinstead ofBaseActivity. - Remove
HelpDesignand hostHelpScreendirectly fromHelpActivityviasetContent.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/kotlin/com/github/kr328/clash/ui/DesignActivity.kt | Introduces new BaseActivity/DesignActivity split and moves coroutine/events + Design lifecycle into DesignActivity. |
| app/src/main/kotlin/com/github/kr328/clash/settings/SettingsActivity.kt | Switches to DesignActivity<SettingsDesign>. |
| app/src/main/kotlin/com/github/kr328/clash/settings/OverrideSettingsActivity.kt | Switches to DesignActivity<OverrideSettingsDesign>. |
| app/src/main/kotlin/com/github/kr328/clash/settings/NetworkSettingsActivity.kt | Switches to DesignActivity<NetworkSettingsDesign>. |
| app/src/main/kotlin/com/github/kr328/clash/settings/MetaFeatureSettingsActivity.kt | Switches to DesignActivity<MetaFeatureSettingsDesign>. |
| app/src/main/kotlin/com/github/kr328/clash/settings/AppSettingsActivity.kt | Switches to DesignActivity<AppSettingsDesign>. |
| app/src/main/kotlin/com/github/kr328/clash/settings/AccessControlActivity.kt | Switches to DesignActivity<AccessControlDesign>. |
| app/src/main/kotlin/com/github/kr328/clash/remote/Broadcasts.kt | Makes Broadcasts.Observer methods default to no-ops to simplify observers. |
| app/src/main/kotlin/com/github/kr328/clash/proxy/ProxyActivity.kt | Switches to DesignActivity<ProxyDesign>. |
| app/src/main/kotlin/com/github/kr328/clash/profile/ProvidersActivity.kt | Switches to DesignActivity<ProvidersDesign>. |
| app/src/main/kotlin/com/github/kr328/clash/profile/PropertiesActivity.kt | Switches to DesignActivity<PropertiesDesign>. |
| app/src/main/kotlin/com/github/kr328/clash/profile/ProfilesActivity.kt | Switches to DesignActivity<ProfilesDesign>. |
| app/src/main/kotlin/com/github/kr328/clash/profile/NewProfileActivity.kt | Switches to DesignActivity<NewProfileDesign>. |
| app/src/main/kotlin/com/github/kr328/clash/main/ui/HelpDesign.kt | Removes the HelpDesign wrapper and exposes HelpScreen as a top-level composable. |
| app/src/main/kotlin/com/github/kr328/clash/main/MainActivity.kt | Switches to DesignActivity<MainDesign>. |
| app/src/main/kotlin/com/github/kr328/clash/main/HelpActivity.kt | Converts to a simple BaseActivity that calls setContent directly. |
| app/src/main/kotlin/com/github/kr328/clash/log/LogsActivity.kt | Switches to DesignActivity<LogsDesign>. |
| app/src/main/kotlin/com/github/kr328/clash/log/LogcatActivity.kt | Switches to DesignActivity<LogcatDesign>. |
| app/src/main/kotlin/com/github/kr328/clash/files/FilesActivity.kt | Switches to DesignActivity<FilesDesign>. |
| app/src/main/kotlin/com/github/kr328/clash/crash/AppCrashedActivity.kt | Switches to DesignActivity<AppCrashedDesign>. |
| app/src/main/kotlin/com/github/kr328/clash/crash/ApkBrokenActivity.kt | Switches to DesignActivity<ApkBrokenDesign>. |
💡 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.