Code reformatting and adding conditional callback queue dispatch to UIImage callback
This commit is contained in:
parent
91d4614028
commit
9b515d4ebe
1 changed files with 2 additions and 4 deletions
|
|
@ -82,7 +82,7 @@ static dispatch_queue_t image_request_operation_processing_queue() {
|
||||||
dispatch_async(image_request_operation_processing_queue(), ^(void) {
|
dispatch_async(image_request_operation_processing_queue(), ^(void) {
|
||||||
UIImage *processedImage = imageProcessingBlock(image);
|
UIImage *processedImage = imageProcessingBlock(image);
|
||||||
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^(void) {
|
dispatch_async(requestOperation.successCallbackQueue ? requestOperation.successCallbackQueue : dispatch_get_main_queue(), ^(void) {
|
||||||
success(operation.request, operation.response, processedImage);
|
success(operation.request, operation.response, processedImage);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -113,9 +113,7 @@ static dispatch_queue_t image_request_operation_processing_queue() {
|
||||||
dispatch_async(image_request_operation_processing_queue(), ^(void) {
|
dispatch_async(image_request_operation_processing_queue(), ^(void) {
|
||||||
NSImage *processedImage = imageProcessingBlock(image);
|
NSImage *processedImage = imageProcessingBlock(image);
|
||||||
|
|
||||||
dispatch_async(requestOperation.successCallbackQueue?
|
dispatch_async(requestOperation.successCallbackQueue ? requestOperation.successCallbackQueue : dispatch_get_main_queue(), ^(void) {
|
||||||
requestOperation.successCallbackQueue:
|
|
||||||
dispatch_get_main_queue(), ^(void) {
|
|
||||||
success(operation.request, operation.response, processedImage);
|
success(operation.request, operation.response, processedImage);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue