Skip to content

fix: broadcast override changed when clearing override - #882

Open
lingyicute wants to merge 1 commit into
MetaCubeX:mainfrom
lingyicute:main
Open

lingyicute wants to merge 1 commit into
MetaCubeX:mainfrom
lingyicute:main

Conversation

@lingyicute

Copy link
Copy Markdown

When resetting overrides in OverrideSettingsActivity or MetaFeatureSettingsActivity, ClashManager.clearOverride clears the override slot on disk/memory but does not call context.sendOverrideChanged(). As a result, ConfigurationModule is not notified to reload the active profile while Clash is running, leaving the previous override settings active until the service is restarted.

Call context.sendOverrideChanged() in ClashManager.clearOverride to match patchOverride.

zh_cn:

在「覆写」或「Meta 特性」设置页点击重置时,ClashManager.clearOverride 仅清除了覆写配置,未像 patchOverride 一样调用 context.sendOverrideChanged() 发送广播,导致 Clash 运行期间重置覆写后不会触发 ConfigurationModule 重载配置,旧的覆写设置仍继续生效。

在 ClashManager.clearOverride 中补充 context.sendOverrideChanged() 调用。

Signed-off-by: lingyicute <xlyxinglinyi@gmail.com>
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