mirror of
https://github.com/qinyuhang/ShadowsocksX-NG-R.git
synced 2026-10-20 06:24:32 +00:00
fix crash on import json config file
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user