From ff09dc09b3c8929d7a7a2286a5307b3d68b34e20 Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Wed, 20 Feb 2019 12:07:51 +0100 Subject: [PATCH] Fix other Lib calls on BG threads --- Classes/LinphoneUI/UIChatBubbleTextCell.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/LinphoneUI/UIChatBubbleTextCell.m b/Classes/LinphoneUI/UIChatBubbleTextCell.m index 2260be3d9..78c6311a5 100644 --- a/Classes/LinphoneUI/UIChatBubbleTextCell.m +++ b/Classes/LinphoneUI/UIChatBubbleTextCell.m @@ -316,7 +316,7 @@ [[PHImageManager defaultManager] requestImageForAsset:asset targetSize:PHImageManagerMaximumSize contentMode:PHImageContentModeDefault options:options resultHandler:^(UIImage *image, NSDictionary * info) { if (image) { - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, (unsigned long)NULL), + dispatch_async(dispatch_get_main_queue(), ^(void) { [_chatRoomDelegate startImageUpload:img assetId:localImage withQuality:(uploadQuality ? [uploadQuality floatValue] : 0.9)]; }); @@ -342,7 +342,7 @@ NSURL *url = urlAsset.URL; NSData *data = [NSData dataWithContentsOfURL:url]; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, (unsigned long)NULL), + dispatch_async(dispatch_get_main_queue(), ^(void) { [_chatRoomDelegate startFileUpload:data assetId:localVideo]; });