Merge branch 'pr/97' into develop

# Conflicts:
#	ShadowsocksX-NG/AppDelegate.swift
This commit is contained in:
Charlie Qiu
2016-10-18 22:11:04 +08:00

View File

@ -385,17 +385,15 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
showRunningModeMenuItem.state = defaults.bool(forKey: "ShowRunningModeOnStatusBar") ? 1 : 0 showRunningModeMenuItem.state = defaults.bool(forKey: "ShowRunningModeOnStatusBar") ? 1 : 0
var serverMenuText = "Servers".localized var serverMenuText = "Servers".localized
if let serverProfiles = defaults.array(forKey: "ServerProfiles") {
for v in serverProfiles { let mgr = ServerProfileManager.instance
let profile = v as! [String:Any] for p in mgr.profiles {
if profile["Id"] as! String == defaults.string(forKey: "ActiveServerProfileId")! { if mgr.activeProfileId == p.uuid {
var profileName :String var profileName :String
if profile["Remark"] as! String != "" { if !p.remark.isEmpty {
profileName = profile["Remark"] as! String profileName = p.remark
} else { } else {
profileName = profile["ServerHost"] as! String profileName = p.serverHost
}
serverMenuText = "\(serverMenuText) - \(profileName)"
} }
} }
} }