Need to -resume the task to start it, fixes issue with importing sites.
This commit is contained in:
parent
2bdec415e9
commit
3fcf1131ac
@ -269,8 +269,8 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
NSURL *url = openPanel.URL;
|
||||
[openPanel close];
|
||||
|
||||
[[NSURLSession sharedSession]
|
||||
dataTaskWithURL:url completionHandler:^(NSData *importedSitesData, NSURLResponse *response, NSError *error) {
|
||||
[[[NSURLSession sharedSession] dataTaskWithURL:url completionHandler:
|
||||
^(NSData *importedSitesData, NSURLResponse *response, NSError *error) {
|
||||
if (error)
|
||||
err( @"While reading imported sites from %@: %@", url, [error fullDescription] );
|
||||
if (!importedSitesData)
|
||||
@ -342,7 +342,7 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
break;
|
||||
}
|
||||
} );
|
||||
}];
|
||||
}] resume];
|
||||
}
|
||||
|
||||
- (IBAction)togglePreference:(id)sender {
|
||||
|
Loading…
Reference in New Issue
Block a user