refactor: Remove deprecated code

This commit is contained in:
Andrea Busi
2023-09-07 15:30:03 +02:00
parent 037a74061d
commit d426f15c8e
@@ -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;
});
}
}
}];