From 17a4580d16b2a00db86737542d226d6fa87b9a58 Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Sun, 25 Jul 2021 22:18:54 +0200 Subject: [PATCH] adjust chat bubble size when only VR & Text --- Classes/LinphoneUI/UIChatBubbleTextCell.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/LinphoneUI/UIChatBubbleTextCell.m b/Classes/LinphoneUI/UIChatBubbleTextCell.m index 5e8e57013..972398ee1 100644 --- a/Classes/LinphoneUI/UIChatBubbleTextCell.m +++ b/Classes/LinphoneUI/UIChatBubbleTextCell.m @@ -625,7 +625,7 @@ static const CGFloat CELL_MESSAGE_Y_MARGIN = 44; LinphoneContent *fileContent = linphone_chat_message_get_file_transfer_information(chat); - if (url == nil && fileContent == NULL) { + if (url == nil && (fileContent == NULL||fileContent == voiceContent)) { size = [self computeBoundingBox:messageText size:CGSizeMake(width - CELL_MESSAGE_X_MARGIN - 4, CGFLOAT_MAX) font:messageFont]; @@ -680,6 +680,7 @@ static const CGFloat CELL_MESSAGE_Y_MARGIN = 44; CGSize baseSize = CGSizeMake(120 + CELL_MESSAGE_X_MARGIN, 120 + CELL_MESSAGE_Y_MARGIN + textSize.height + (textSize.height != 0 ? 20 : 0)); if (voiceContent) { baseSize = [self addVoicePlayerToSize:baseSize withMargins:true]; + } return baseSize; }