mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 08:12:28 +00:00
Using class property
This commit is contained in:
@@ -176,7 +176,7 @@
|
|||||||
if(!url || !handler) {
|
if(!url || !handler) {
|
||||||
return; // no url, no handler so no need to do anything
|
return; // no url, no handler so no need to do anything
|
||||||
}
|
}
|
||||||
|
|
||||||
NSString *urlString = [NSString stringWithFormat:@"%@://%@/favicon.ico", url.scheme, url.host ? url.host : @""];
|
NSString *urlString = [NSString stringWithFormat:@"%@://%@/favicon.ico", url.scheme, url.host ? url.host : @""];
|
||||||
NSURL *favIconURL = [NSURL URLWithString:urlString];
|
NSURL *favIconURL = [NSURL URLWithString:urlString];
|
||||||
if(!favIconURL) {
|
if(!favIconURL) {
|
||||||
@@ -185,7 +185,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSURLSessionTask *task = [[NSURLSession sharedSession] dataTaskWithURL:favIconURL completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
|
NSURLSessionTask *task = [NSURLSession.sharedSession dataTaskWithURL:favIconURL completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
|
||||||
if(error) {
|
if(error) {
|
||||||
handler(nil);
|
handler(nil);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user