Fix if update subscribe delete using node problem

Now update subscribe delete the using node, the app
will automatic select the first profile
This commit is contained in:
秦宇航
2017-07-22 12:05:28 +08:00
parent 1249a9f1a8
commit 290865ad18
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
DispatchQueue.global().async {
// Version Check!
if defaults.bool(forKey: "AutoCheckUpdate"){
if defaults.bool(forKey: "AutoCheckUpdate") {
self.checkForUpdate(mustShowAlert: false)
}
if defaults.bool(forKey: "AutoUpdateSubscribe") {
@@ -26,6 +26,12 @@ class ServerProfileManager: NSObject {
}
}
activeProfileId = defaults.string(forKey: "ActiveServerProfileId")
for p in profiles {
if p.uuid == activeProfileId {
return
}
}
activeProfileId = profiles[0].uuid
}
func setActiveProfiledId(_ id: String) {