Commit 01614301 authored by DanmeiChen's avatar DanmeiChen
Browse files

enable display image if vfs not enabled

parent deb245bc
Pipeline #27676 failed with stage
in 14 seconds
......@@ -203,7 +203,7 @@ static const CGFloat CELL_IMAGE_X_MARGIN = 100;
NSString *fileName = [NSString stringWithUTF8String:linphone_content_get_name(fileContent)];
if (!filePath) {
char *cPath = linphone_content_get_plain_file_path(fileContent);
char *cPath = [[LinphoneManager instance] lpConfigBoolForKey:@"vfs_enabled_preference"] ? linphone_content_get_plain_file_path(fileContent) : NULL;
if (cPath) {
filePath = [NSString stringWithUTF8String:cPath];
ms_free(cPath);
......
......@@ -287,9 +287,9 @@
dispatch_async(dispatch_get_main_queue(), ^ {
LinphoneContent *fileContent = linphone_chat_message_get_file_transfer_information(_message);
NSData *data = NULL;
char *cPath = linphone_content_get_plain_file_path(fileContent);
char *cPath = [[LinphoneManager instance] lpConfigBoolForKey:@"vfs_enabled_preference"] ? linphone_content_get_plain_file_path(fileContent) : NULL;
if (cPath) {
NSString *filePath = [NSString stringWithUTF8String:linphone_content_get_plain_file_path(fileContent)];
NSString *filePath = [NSString stringWithUTF8String:cPath];
data = [NSData dataWithContentsOfFile:filePath];
ms_free(cPath);
[[NSFileManager defaultManager] removeItemAtPath:filePath error:NULL];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment