mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
refactor: replace println with logging in core validation and tray quit function
This commit is contained in:
@@ -40,11 +40,18 @@ const SettingSystem = ({ onError }: Props) => {
|
||||
"getRunningMode",
|
||||
getRunningMode,
|
||||
);
|
||||
const { data: autoLaunchEnabled } = useSWR("getAutoLaunchStatus", getAutoLaunchStatus);
|
||||
const { data: autoLaunchEnabled } = useSWR(
|
||||
"getAutoLaunchStatus",
|
||||
getAutoLaunchStatus,
|
||||
);
|
||||
|
||||
// 当实际自启动状态与配置不同步时更新配置
|
||||
useEffect(() => {
|
||||
if (autoLaunchEnabled !== undefined && verge && verge.enable_auto_launch !== autoLaunchEnabled) {
|
||||
if (
|
||||
autoLaunchEnabled !== undefined &&
|
||||
verge &&
|
||||
verge.enable_auto_launch !== autoLaunchEnabled
|
||||
) {
|
||||
// 静默更新配置,不触发UI刷新
|
||||
mutateVerge({ ...verge, enable_auto_launch: autoLaunchEnabled }, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user