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;
|
NSURL *url = openPanel.URL;
|
||||||
[openPanel close];
|
[openPanel close];
|
||||||
|
|
||||||
[[NSURLSession sharedSession]
|
[[[NSURLSession sharedSession] dataTaskWithURL:url completionHandler:
|
||||||
dataTaskWithURL:url completionHandler:^(NSData *importedSitesData, NSURLResponse *response, NSError *error) {
|
^(NSData *importedSitesData, NSURLResponse *response, NSError *error) {
|
||||||
if (error)
|
if (error)
|
||||||
err( @"While reading imported sites from %@: %@", url, [error fullDescription] );
|
err( @"While reading imported sites from %@: %@", url, [error fullDescription] );
|
||||||
if (!importedSitesData)
|
if (!importedSitesData)
|
||||||
@ -342,7 +342,7 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}];
|
}] resume];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction)togglePreference:(id)sender {
|
- (IBAction)togglePreference:(id)sender {
|
||||||
|
Loading…
Reference in New Issue
Block a user