-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS11] Fix warnings #428
[iOS11] Fix warnings #428
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,9 +209,18 @@ - (BOOL)responseRecoverableFrom404:(NSHTTPURLResponse*)response | |
#if DEBUG | ||
- (void)concurrentDownloads:(void (^_Nullable)(NSUInteger concurrentDownloads))concurrentDownloadsCompletion | ||
{ | ||
[self.session getAllTasksWithCompletionHandler:^(NSArray<__kindof NSURLSessionTask *> * _Nonnull tasks) { | ||
concurrentDownloadsCompletion(tasks.count); | ||
}]; | ||
if (@available(macos 10.11, iOS 9.0, watchOS 2.0, tvOS 9.0, *)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @garrettmoon I remember we talked about not using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @maicki yeah, still shooting for that, but it'll be on top of this and will be a macro which uses |
||
[self.session getAllTasksWithCompletionHandler:^(NSArray<__kindof NSURLSessionTask *> * _Nonnull tasks) { | ||
concurrentDownloadsCompletion(tasks.count); | ||
}]; | ||
} else { | ||
[self.session getTasksWithCompletionHandler:^(NSArray<NSURLSessionDataTask *> * _Nonnull dataTasks, | ||
NSArray<NSURLSessionUploadTask *> * _Nonnull uploadTasks, | ||
NSArray<NSURLSessionDownloadTask *> * _Nonnull downloadTasks) { | ||
NSUInteger total = dataTasks.count + uploadTasks.count + downloadTasks.count; | ||
concurrentDownloadsCompletion(total); | ||
}]; | ||
} | ||
} | ||
|
||
#endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super minor nit: mind fixing the spacing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no problem, will fix tomorrow morning. Thank you for review