mirror of
https://github.com/qinyuhang/ShadowsocksX-NG-R.git
synced 2026-12-06 06:37:05 +00:00
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:
@@ -717,7 +717,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
|
|||||||
NotificationCenter.default.post(
|
NotificationCenter.default.post(
|
||||||
name: Notification.Name(rawValue: "NOTIFY_FOUND_SS_URL"), object: nil
|
name: Notification.Name(rawValue: "NOTIFY_FOUND_SS_URL"), object: nil
|
||||||
, userInfo: [
|
, userInfo: [
|
||||||
"ruls": [url],
|
"urls": [url],
|
||||||
"source": "url",
|
"source": "url",
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,7 +156,6 @@ NSDictionary<NSString *, id>* ParseSSURL(NSURL* url) {
|
|||||||
urlString = [urlString stringByReplacingOccurrencesOfString:@"ssr://" withString:@"" options:NSAnchoredSearch range:NSMakeRange(0, urlString.length)];
|
urlString = [urlString stringByReplacingOccurrencesOfString:@"ssr://" withString:@"" options:NSAnchoredSearch range:NSMakeRange(0, urlString.length)];
|
||||||
// NSData *data = [[NSData alloc] initWithBase64EncodedString:urlString options:0];
|
// NSData *data = [[NSData alloc] initWithBase64EncodedString:urlString options:0];
|
||||||
NSString *decodedString = decode64(urlString);//[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
|
NSString *decodedString = decode64(urlString);//[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
|
||||||
urlString = decodedString;
|
|
||||||
if ([decodedString isEqual: @""]) {
|
if ([decodedString isEqual: @""]) {
|
||||||
[[NSNotificationCenter defaultCenter]
|
[[NSNotificationCenter defaultCenter]
|
||||||
postNotificationName:@"NOTIFY_INVALIDE_QR"
|
postNotificationName:@"NOTIFY_INVALIDE_QR"
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user