diff --git a/Classes/LaunchScreen.xib b/Classes/LaunchScreen.xib index c0d4d0e1f..34167a785 100644 --- a/Classes/LaunchScreen.xib +++ b/Classes/LaunchScreen.xib @@ -1,8 +1,8 @@ - + - + @@ -13,8 +13,9 @@ - + + diff --git a/Classes/LinphoneUI/UIChatBubblePhotoCell.m b/Classes/LinphoneUI/UIChatBubblePhotoCell.m index b96614f46..831277919 100644 --- a/Classes/LinphoneUI/UIChatBubblePhotoCell.m +++ b/Classes/LinphoneUI/UIChatBubblePhotoCell.m @@ -247,7 +247,8 @@ font:self.contactDateLabel.font]; CGSize bubbleSize; - bubbleSize.width = MAX(messageSize.width, dateSize.width + self.statusImage.frame.size.width + 5) + MARGIN_WIDTH; + bubbleSize.width = + MAX(messageSize.width, dateSize.width + self.statusErrorImage.frame.size.width + 5) + MARGIN_WIDTH; bubbleSize.height = messageSize.height + MARGIN_HEIGHT; return bubbleSize; diff --git a/Classes/LinphoneUI/UIChatBubblePhotoCell.xib b/Classes/LinphoneUI/UIChatBubblePhotoCell.xib index c836d6bca..333dbe37c 100644 --- a/Classes/LinphoneUI/UIChatBubblePhotoCell.xib +++ b/Classes/LinphoneUI/UIChatBubblePhotoCell.xib @@ -18,7 +18,8 @@ - + + @@ -109,17 +110,22 @@ - - - - - - + + + + + + + + + + + @@ -146,7 +152,7 @@ - + diff --git a/Classes/LinphoneUI/UIChatBubbleTextCell.h b/Classes/LinphoneUI/UIChatBubbleTextCell.h index c362d6ccf..22c415c7e 100644 --- a/Classes/LinphoneUI/UIChatBubbleTextCell.h +++ b/Classes/LinphoneUI/UIChatBubbleTextCell.h @@ -29,7 +29,8 @@ @property(nonatomic, weak) IBOutlet UIImageView *backgroundColorImage; @property(nonatomic, weak) IBOutlet UIRoundedImageView *avatarImage; @property(nonatomic, weak) IBOutlet UILabel *contactDateLabel; -@property(nonatomic, weak) IBOutlet UIImageView *statusImage; +@property(nonatomic, weak) IBOutlet UIImageView *statusErrorImage; +@property(weak, nonatomic) IBOutlet UIActivityIndicatorView *statusInProgressSpinner; @property(nonatomic, weak) IBOutlet UITextViewNoDefine *messageText; @property(weak, nonatomic) IBOutlet UIImageView *bottomBarColor; @property(nonatomic, strong) id chatRoomDelegate; diff --git a/Classes/LinphoneUI/UIChatBubbleTextCell.m b/Classes/LinphoneUI/UIChatBubbleTextCell.m index 6c0061880..d19f3e76b 100644 --- a/Classes/LinphoneUI/UIChatBubbleTextCell.m +++ b/Classes/LinphoneUI/UIChatBubbleTextCell.m @@ -116,26 +116,20 @@ _backgroundColorImage.image = _bottomBarColor.image = [UIImage imageNamed:(outgoing ? @"color_A.png" : @"color_D.png")]; - if (!outgoing) { - _statusImage.accessibilityValue = @"incoming"; - _statusImage.hidden = TRUE; // not useful for incoming chats.. - } else if (state == LinphoneChatMessageStateInProgress) { - _statusImage.image = [UIImage imageNamed:@"chat_message_inprogress.png"]; - _statusImage.accessibilityValue = @"in progress"; - _statusImage.hidden = FALSE; - } else if (state == LinphoneChatMessageStateDelivered) { - _statusImage.image = nil; - _statusImage.accessibilityValue = @"delivered"; - _statusImage.hidden = TRUE; - } else { - _statusImage.image = [UIImage imageNamed:@"chat_message_not_delivered.png"]; - _statusImage.accessibilityValue = @"not delivered"; - _statusImage.hidden = FALSE; + if (outgoing && state == LinphoneChatMessageStateInProgress) { + _statusErrorImage.hidden = YES; + [_statusInProgressSpinner startAnimating]; + } else if (outgoing && state != LinphoneChatMessageStateDelivered) { + _statusErrorImage.hidden = NO; + [_statusInProgressSpinner stopAnimating]; NSAttributedString *resend_text = [[NSAttributedString alloc] initWithString:NSLocalizedString(@"Resend", @"Resend") attributes:@{NSForegroundColorAttributeName : [UIColor redColor]}]; [_contactDateLabel setAttributedText:resend_text]; + } else { + _statusErrorImage.hidden = YES; + [_statusInProgressSpinner stopAnimating]; } if (outgoing) { @@ -252,7 +246,7 @@ static void message_status(LinphoneChatMessage *msg, LinphoneChatMessageState st [self computeBoundingBox:_contactDateLabel.text size:_contactDateLabel.frame.size font:_contactDateLabel.font]; CGSize bubbleSize; - bubbleSize.width = MAX(messageSize.width, dateSize.width + _statusImage.frame.size.width + 5) + MARGIN_WIDTH; + bubbleSize.width = MAX(messageSize.width, dateSize.width + _statusErrorImage.frame.size.width + 5) + MARGIN_WIDTH; bubbleSize.height = messageSize.height + MARGIN_HEIGHT; return bubbleSize; diff --git a/Classes/LinphoneUI/UIChatBubbleTextCell.xib b/Classes/LinphoneUI/UIChatBubbleTextCell.xib index 44d706877..52153f10c 100644 --- a/Classes/LinphoneUI/UIChatBubbleTextCell.xib +++ b/Classes/LinphoneUI/UIChatBubbleTextCell.xib @@ -1,8 +1,8 @@ - + - + @@ -14,7 +14,8 @@ - + + @@ -41,7 +42,7 @@ - + @@ -62,12 +63,17 @@ - - + + + + + + + diff --git a/linphone.xcodeproj/xcshareddata/xcschemes/linphone.xcscheme b/linphone.xcodeproj/xcshareddata/xcschemes/linphone.xcscheme index 97800868c..9781b8192 100644 --- a/linphone.xcodeproj/xcshareddata/xcschemes/linphone.xcscheme +++ b/linphone.xcodeproj/xcshareddata/xcschemes/linphone.xcscheme @@ -1,7 +1,7 @@ + version = "1.3"> @@ -37,10 +37,10 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -66,11 +66,11 @@