Skip to content

Unwrap HelpDesign#118

Merged
Goooler merged 4 commits into
trunkfrom
migrate-to-vm-step-1
Apr 23, 2026
Merged

Unwrap HelpDesign#118
Goooler merged 4 commits into
trunkfrom
migrate-to-vm-step-1

Conversation

@Goooler
Copy link
Copy Markdown
Owner

@Goooler Goooler commented Apr 23, 2026

Refs #119.

@Goooler Goooler force-pushed the migrate-to-vm-step-1 branch from 55b9a0a to 0e7787b Compare April 23, 2026 05:30
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

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-generic BaseActivity (common setup + broadcasts + startActivityForResult) and DesignActivity<D> (MainScope, events channel, Design wiring).
  • Migrate existing Design-based activities to extend DesignActivity instead of BaseActivity.
  • Remove HelpDesign and host HelpScreen directly from HelpActivity via setContent.

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.

Comment thread app/src/main/kotlin/com/github/kr328/clash/main/ui/HelpDesign.kt
@Goooler Goooler enabled auto-merge (squash) April 23, 2026 05:52
@Goooler Goooler merged commit 2c6982d into trunk Apr 23, 2026
3 checks passed
@Goooler Goooler deleted the migrate-to-vm-step-1 branch April 23, 2026 05:56
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