Skip to content

Fix external Clash control shortcuts#805

Open
ZenX404 wants to merge 1 commit into
MetaCubeX:mainfrom
ZenX404:fix-external-control-shortcuts
Open

Fix external Clash control shortcuts#805
ZenX404 wants to merge 1 commit into
MetaCubeX:mainfrom
ZenX404:fix-external-control-shortcuts

Conversation

@ZenX404

@ZenX404 ZenX404 commented Jul 25, 2026

Copy link
Copy Markdown

Summary

Fix external Clash control shortcuts when the app's UI process has not initialized or refreshed its cached service state.

Changes

  • Use StatusClient to query the service state for start and toggle actions.
  • Always dispatch the stop request for ACTION_STOP_CLASH.
  • Remove the dependency on Remote.broadcasts.clashRunning from external shortcut handling.

Result

The stop shortcut can now stop Clash even when the main application interface has not been opened.

Related discussion: #775

Replace the cached Remote.broadcasts.clashRunning state with a direct StatusClient query for start and toggle actions.

Always dispatch the stop request for ACTION_STOP_CLASH, ensuring the stop shortcut works even when the app process has not initialized or refreshed its cached service state.
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.

1 participant