From ec8039154c2a955a5e23cd8ce3d74a91386eb578 Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Thu, 20 May 2021 15:21:19 +0200 Subject: [PATCH] fix compability of display image again --- Classes/LinphoneUI/UIChatBubblePhotoCell.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Classes/LinphoneUI/UIChatBubblePhotoCell.m b/Classes/LinphoneUI/UIChatBubblePhotoCell.m index 65708331d..4c8d77b44 100644 --- a/Classes/LinphoneUI/UIChatBubblePhotoCell.m +++ b/Classes/LinphoneUI/UIChatBubblePhotoCell.m @@ -191,7 +191,9 @@ static const CGFloat CELL_IMAGE_X_MARGIN = 100; NSString *fileType = [NSString stringWithUTF8String:linphone_content_get_type(fileContent)]; NSString *fileName = [NSString stringWithUTF8String:linphone_content_get_name(fileContent)]; NSString *filePath = [[LinphoneManager cacheDirectory] stringByAppendingPathComponent:fileName]; - + if (![[NSFileManager defaultManager] fileExistsAtPath:filePath]) { + filePath = [[LinphoneManager cacheDirectory] stringByAppendingPathComponent:(localImage?:(localVideo?:localFile))]; + } if ([[NSFileManager defaultManager] fileExistsAtPath:filePath]) { // already downloaded