fix crash on import json config file

This commit is contained in:
qinyuhang
2016-10-09 17:45:40 +08:00
parent f790b22516
commit c0446a49ea
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.4-R</string>
<string>1.3.4-R8</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
+2 -2
View File
@@ -111,10 +111,10 @@ class ServerProfileManager: NSObject {
self.save()
NotificationCenter.default.post(name: Notification.Name(rawValue: NOTIFY_SERVER_PROFILES_CHANGED), object: nil)
}
let configsCount = (jsonArr1.object(forKey: "configs") as AnyObject).count
let configsCount = (jsonArr1.object(forKey: "configs") as! [[String: AnyObject]]).count
let notification = NSUserNotification()
notification.title = "Import Server Profile succeed!".localized
notification.informativeText = "Successful import \(configsCount!) items".localized
notification.informativeText = "Successful import \(configsCount) items".localized
NSUserNotificationCenter.default
.deliver(notification)
}else{