Fixed: Auto remember proxy group not work

This commit is contained in:
yicheng 2018-08-08 13:45:41 +08:00
parent fbdbbc073d
commit e4a64518e3
2 changed files with 1 additions and 2 deletions

View File

@ -89,7 +89,7 @@ class ApiRequest{
static func updateProxyGroup(group:String,selectProxy:String,callback:@escaping ((Bool)->())) {
request(ConfigManager.apiUrl + "/proxies/\(group)", method: .put, parameters: ["name":selectProxy], encoding: JSONEncoding.default).responseJSON { (response) in
callback(response.response?.statusCode == 200)
callback(response.response?.statusCode == 204)
}
}
}

View File

@ -53,7 +53,6 @@ class ConfigManager {
static var selectedProxyMap:[String:String] {
get{
return ["Proxy":"ProxyAuto"]
return UserDefaults.standard.dictionary(forKey: "selectedProxyMap") as? [String:String] ?? ["Proxy":"ProxyAuto"]
}
set {