fix compability of display image again

This commit is contained in:
Danmei Chen 2021-05-20 15:21:19 +02:00
parent c1f1f8f36f
commit ec8039154c

View file

@ -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