URL scheme to update current config.

Motivation: i have a script that changes the configuration. When that happens, the app detects the change and ask the user to update. This would allow to programatically tell ClashX to update the config without user intervention
This commit is contained in:
MPTres 2021-11-14 15:42:40 +08:00 committed by Yicheng
parent 0071aac6d2
commit e2067bc100

View File

@ -931,6 +931,8 @@ extension AppDelegate {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
NotificationCenter.default.post(name: Notification.Name(rawValue: "didGetUrl"), object: nil, userInfo: userInfo)
}
} else if host == "update-config" {
updateConfig()
}
}
}