fix crash on click ss url

1) fix typo causing crash on click ss url
2) update ss-local using a 10.10 compiled should not crash on 10.11
3) remove useless code
This commit is contained in:
秦宇航
2017-02-21 08:23:27 +08:00
parent 7f1a778951
commit d5fda648ed
3 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -717,7 +717,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
NotificationCenter.default.post(
name: Notification.Name(rawValue: "NOTIFY_FOUND_SS_URL"), object: nil
, userInfo: [
"ruls": [url],
"urls": [url],
"source": "url",
])
}
-1
View File
@@ -156,7 +156,6 @@ NSDictionary<NSString *, id>* ParseSSURL(NSURL* url) {
urlString = [urlString stringByReplacingOccurrencesOfString:@"ssr://" withString:@"" options:NSAnchoredSearch range:NSMakeRange(0, urlString.length)];
// NSData *data = [[NSData alloc] initWithBase64EncodedString:urlString options:0];
NSString *decodedString = decode64(urlString);//[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
urlString = decodedString;
if ([decodedString isEqual: @""]) {
[[NSNotificationCenter defaultCenter]
postNotificationName:@"NOTIFY_INVALIDE_QR"
Binary file not shown.