From 88341280b693c56a7b5707791a5df03dc414831c Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Thu, 14 Jun 2018 17:37:15 +0200 Subject: [PATCH] merge view --- Classes/ChatConversationView.m | 7 +- .../Base.lproj/UIChatBubblePhotoCell.xib | 46 ++- Classes/LinphoneUI/UIChatBubblePhotoCell.m | 291 ++++++++---------- Classes/LinphoneUI/UIChatBubbleTextCell.m | 38 ++- Classes/Utils/FileTransferDelegate.m | 87 ++---- linphoneExtension/ShareViewController.m | 2 +- 6 files changed, 220 insertions(+), 251 deletions(-) diff --git a/Classes/ChatConversationView.m b/Classes/ChatConversationView.m index 0eba6fa33..534fbb5a9 100644 --- a/Classes/ChatConversationView.m +++ b/Classes/ChatConversationView.m @@ -220,7 +220,7 @@ static UICompositeViewDescription *compositeDescription = nil; NSDictionary *dict = [defaults valueForKey:@"img"]; NSDictionary *dictWeb = [defaults valueForKey:@"web"]; - NSDictionary *dictFile = [defaults valueForKey:@"file"]; + NSDictionary *dictFile = [defaults valueForKey:@"mov"]; NSDictionary *dictText = [defaults valueForKey:@"text"]; if (dict) { //share photo @@ -247,7 +247,7 @@ static UICompositeViewDescription *compositeDescription = nil; NSData *data = dictFile[@"nsData"]; [self confirmShare:data url:[NSURL fileURLWithPath:dictFile[@"url"]]]; [self sendContentText:dictFile[@"name"]]; - [defaults removeObjectForKey:@"file"]; + [defaults removeObjectForKey:@"mov"]; }else if(dictText) { //share text [self sendContentText:dictText[@"name"]]; @@ -370,7 +370,7 @@ static UICompositeViewDescription *compositeDescription = nil; DTActionSheet *sheet = [[DTActionSheet alloc] initWithTitle:NSLocalizedString(@"", nil)]; dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - [sheet addButtonWithTitle:@"send to him" + [sheet addButtonWithTitle:@"send to this friend" block:^() { [self startFileUpload:data withUrl:url]; }]; @@ -856,7 +856,6 @@ void on_chat_room_conference_left(LinphoneChatRoom *cr, const LinphoneEventLog * - (void)openResults:(NSString *) filePath { - //TODO: if file exist // Open the controller. _documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:filePath]]; _documentInteractionController.delegate = self; diff --git a/Classes/LinphoneUI/Base.lproj/UIChatBubblePhotoCell.xib b/Classes/LinphoneUI/Base.lproj/UIChatBubblePhotoCell.xib index 4da2cbc69..65e3aef60 100644 --- a/Classes/LinphoneUI/Base.lproj/UIChatBubblePhotoCell.xib +++ b/Classes/LinphoneUI/Base.lproj/UIChatBubblePhotoCell.xib @@ -19,7 +19,7 @@ - + @@ -27,8 +27,8 @@ - - + + @@ -72,11 +72,11 @@ -