From 61fa88cf78b744e827fdb7bad32871d8da955bc2 Mon Sep 17 00:00:00 2001 From: Guillaume BIENKOWSKI Date: Fri, 23 May 2014 09:44:14 +0200 Subject: [PATCH] Fix regression in chat bubbles: chat model exposed a special state for incoming messages, whereas the internal linphone storage does not. --- Classes/LinphoneUI/UIChatRoomCell.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Classes/LinphoneUI/UIChatRoomCell.m b/Classes/LinphoneUI/UIChatRoomCell.m index 0ba26df5c..0320d9042 100644 --- a/Classes/LinphoneUI/UIChatRoomCell.m +++ b/Classes/LinphoneUI/UIChatRoomCell.m @@ -173,13 +173,15 @@ static UIFont *CELL_FONT = nil; LinphoneChatMessageState state = linphone_chat_message_get_state(chat); - if (state== LinphoneChatMessageStateInProgress) { + if( !linphone_chat_message_is_outgoing(chat) ){ + statusImage.hidden = TRUE; // not useful for incoming chats.. + } else if (state== LinphoneChatMessageStateInProgress) { [statusImage setImage:[UIImage imageNamed:@"chat_message_inprogress.png"]]; statusImage.hidden = FALSE; } else if (state == LinphoneChatMessageStateDelivered) { [statusImage setImage:[UIImage imageNamed:@"chat_message_delivered.png"]]; statusImage.hidden = FALSE; - } else if (state == LinphoneChatMessageStateNotDelivered) { + } else { [statusImage setImage:[UIImage imageNamed:@"chat_message_not_delivered.png"]]; statusImage.hidden = FALSE; @@ -188,8 +190,6 @@ static UIFont *CELL_FONT = nil; attributes:@{NSForegroundColorAttributeName: [UIColor redColor]}]; [dateLabel setAttributedText:resend_text]; [resend_text release]; - } else { - statusImage.hidden = TRUE; } }