forked from mirrors/linphone-iphone
fix share all kind of images
This commit is contained in:
parent
25ff201116
commit
bcca4099a2
3 changed files with 6 additions and 5 deletions
|
|
@ -260,7 +260,8 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[_messageField setText:dict[@"message"]];
|
||||
NSString *key = [[fileName componentsSeparatedByString:@"."] firstObject];
|
||||
NSMutableDictionary <NSString *, PHAsset *> * assetDict = [LinphoneUtils photoAssetsDictionary];
|
||||
if ([fileName hasSuffix:@"JPG"] || [fileName hasSuffix:@"PNG"]) {
|
||||
|
||||
if ([fileName hasSuffix:@"JPG"] || [fileName hasSuffix:@"PNG"] || [fileName hasSuffix:@"jpg"] || [fileName hasSuffix:@"png"]) {
|
||||
PHAsset *phasset = [assetDict objectForKey:key];
|
||||
if (!phasset) {
|
||||
// for the images not really in the photo album
|
||||
|
|
@ -269,7 +270,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
UIImage *image = [[UIImage alloc] initWithData:dict[@"nsData"]];
|
||||
[self chooseImageQuality:image assetId:[phasset localIdentifier]];
|
||||
}
|
||||
} else if ([fileName hasSuffix:@"MOV"]) {
|
||||
} else if ([fileName hasSuffix:@"MOV"] || [fileName hasSuffix:@"mov"]) {
|
||||
[self confirmShare:dict[@"nsData"] url:nil fileName:nil assetId:[[assetDict objectForKey:key] localIdentifier]];
|
||||
} else {
|
||||
LOGE(@"Unable to parse file %@",fileName);
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ static const CGFloat CELL_IMAGE_X_MARGIN = 100;
|
|||
}
|
||||
}
|
||||
else if (localFile) {
|
||||
if ([localFile hasSuffix:@"JPG"] || [localFile hasSuffix:@"PNG"]) {
|
||||
if ([localFile hasSuffix:@"JPG"] || [localFile hasSuffix:@"PNG"] || [localFile hasSuffix:@"jpg"] || [localFile hasSuffix:@"png"]) {
|
||||
NSData *data = [NSData dataWithContentsOfURL:[VIEW(ChatConversationView) getICloudFileUrl:localFile]];
|
||||
UIImage *image = [[UIImage alloc] initWithData:data];
|
||||
[self loadImageAsset:nil image:image];
|
||||
|
|
@ -314,7 +314,7 @@ static const CGFloat CELL_IMAGE_X_MARGIN = 100;
|
|||
PHAsset *asset = [_messageImageView asset];
|
||||
if (!asset) {
|
||||
NSString *localFile = [LinphoneManager getMessageAppDataForKey:@"localfile" inMessage:self.message];
|
||||
if ([localFile hasSuffix:@"JPG"] || [localFile hasSuffix:@"PNG"]) {
|
||||
if ([localFile hasSuffix:@"JPG"] || [localFile hasSuffix:@"PNG"] || [localFile hasSuffix:@"jpg"] || [localFile hasSuffix:@"png"]) {
|
||||
NSData *data = [NSData dataWithContentsOfURL:[VIEW(ChatConversationView) getICloudFileUrl:localFile]];
|
||||
UIImage *image = [[UIImage alloc] initWithData:data];
|
||||
if (image)
|
||||
|
|
|
|||
|
|
@ -465,7 +465,7 @@ static const CGFloat CELL_IMAGE_X_MARGIN = 100;
|
|||
}
|
||||
|
||||
if(localFile) {
|
||||
if ([localFile hasSuffix:@"JPG"] || [localFile hasSuffix:@"PNG"]) {
|
||||
if ([localFile hasSuffix:@"JPG"] || [localFile hasSuffix:@"PNG"] || [localFile hasSuffix:@"jpg"] || [localFile hasSuffix:@"png"]) {
|
||||
NSData *data = [NSData dataWithContentsOfURL:[VIEW(ChatConversationView) getICloudFileUrl:localFile]];
|
||||
UIImage *image = [[UIImage alloc] initWithData:data];
|
||||
size = [self getMediaMessageSizefromOriginalSize:image.size withWidth:width];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue