refactor: Remove deprecated code
This commit is contained in:
@@ -87,10 +87,6 @@
|
||||
NSMutableURLRequest * urlRequest = [NSMutableURLRequest requestWithURL:url];
|
||||
[urlRequest setHTTPMethod:@"GET"];
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
|
||||
});
|
||||
|
||||
NSURLSessionDataTask *dataTask = [self.session dataTaskWithRequest:urlRequest completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
|
||||
NSHTTPURLResponse *httpResp = (NSHTTPURLResponse *)response;
|
||||
if (error) {
|
||||
@@ -119,9 +115,6 @@
|
||||
onSuccess(JSON);
|
||||
break;
|
||||
}
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
NSString *newStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
|
||||
@@ -152,9 +145,6 @@
|
||||
|
||||
NSError *error = [NSError errorWithDomain:NSMachErrorDomain code:0 userInfo:@{MESSAGGIO : NSLocalizedString(@"manual_error", @"messaggio errore inserimento credenziali")}];
|
||||
onFailure(error);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
|
||||
});
|
||||
}
|
||||
}
|
||||
}];
|
||||
|
||||
Reference in New Issue
Block a user