2
0

Need to -resume the task to start it, fixes issue with importing sites.

This commit is contained in:
Maarten Billemont 2017-04-14 00:24:34 -04:00
parent 2bdec415e9
commit 3fcf1131ac

View File

@ -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 {