Share main component helpers for more scopes - #278
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR moves main app component helpers into common so shared modules can construct main activity intents and resolve the launcher alias without depending on glue.
Changes:
- Relocates
mainIntent,mainActivityAlias, andAppInfoProviderfromglue-scoped packages tocommon. - Updates app, glue, settings, and log modules to import the new common helpers.
- Moves Koin core dependency from
gluetocommon.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
common/src/main/kotlin/com/github/kr328/clash/common/util/Intent.kt |
Adds shared main activity intent and alias utilities. |
common/src/main/kotlin/com/github/kr328/clash/common/di/AppInfoProvider.kt |
Repackages app info provider under common.di. |
common/build.gradle.kts |
Adds Koin core dependency required by the common provider. |
glue/src/main/kotlin/com/github/kr328/clash/glue/util/Intent.kt |
Removes old glue-local intent utilities. |
glue/build.gradle.kts |
Removes Koin dependency from glue. |
glue/src/main/kotlin/com/github/kr328/clash/glue/remote/Remote.kt |
Uses common mainIntent. |
glue/src/main/kotlin/com/github/kr328/clash/glue/store/UiStore.kt |
Uses common mainActivityAlias. |
ui/log/src/main/kotlin/com/github/kr328/clash/log/LogcatService.kt |
Uses common mainIntent with lambda configuration. |
ui/settings/src/main/kotlin/com/github/kr328/clash/settings/vm/AppSettingsViewModel.kt |
Uses common provider and alias imports. |
app/src/main/kotlin/com/github/kr328/clash/app/AppModule.kt |
Registers the common AppInfoProvider. |
app/src/main/kotlin/com/github/kr328/clash/app/MainActivity.kt |
Updates shortcut intents to the common helper API. |
app/src/main/kotlin/com/github/kr328/clash/app/DialerReceiver.kt |
Uses common mainIntent. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
No description provided.