Skip to content

Defer creating shortcuts#214

Merged
Goooler merged 2 commits intotrunkfrom
dont-remove-shortcuts
May 8, 2026
Merged

Defer creating shortcuts#214
Goooler merged 2 commits intotrunkfrom
dont-remove-shortcuts

Conversation

@Goooler
Copy link
Copy Markdown
Owner

@Goooler Goooler commented May 8, 2026

We don't have to remove them when the MainActivityAlias is disabled.

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 changes when dynamic app shortcuts are created so they’re only set up when MainActivity is launched, avoiding shortcut work tied to the launcher alias being enabled/disabled.

Changes:

  • Remove shortcut setup from MainApplication startup.
  • Add shortcut setup to MainActivity.onCreate().
  • Stop removing all dynamic shortcuts when toggling “Hide app icon”.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
ui/settings/src/main/kotlin/com/github/kr328/clash/settings/vm/AppSettingsViewModel.kt Removes the “hide icon” path that cleared dynamic shortcuts.
app/src/main/kotlin/com/github/kr328/clash/app/MainApplication.kt Removes app-start shortcut initialization (but leaves an unused uiStore member/imports).
app/src/main/kotlin/com/github/kr328/clash/app/MainActivity.kt Adds setupShortcuts() and initializes dynamic shortcuts during activity creation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/src/main/kotlin/com/github/kr328/clash/app/MainApplication.kt Outdated
We don't have to remove them when the MainActivityAlias is disabled.
@Goooler Goooler force-pushed the dont-remove-shortcuts branch from 2791f00 to 40cfeb2 Compare May 8, 2026 13:21
@Goooler Goooler enabled auto-merge (squash) May 8, 2026 13:22
@Goooler Goooler merged commit c3c7779 into trunk May 8, 2026
3 checks passed
@Goooler Goooler deleted the dont-remove-shortcuts branch May 8, 2026 13:26
Copilot AI added a commit that referenced this pull request May 9, 2026
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