From c0292d912390d33e10b4c31b8e9a797737f5ca36 Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Mon, 14 Jun 2021 11:08:00 +0200 Subject: [PATCH] Ephemeral messages minor adjustments: - Improved ephemeral icon placement in ChatList - Display ephemeral information on incoming messages in chat room - Added duration of expiration to LinphoneEventLogTypeConferenceEphemeralMessageEnabled --- Classes/ChatConversationTableView.m | 2 +- Classes/LinphoneUI/Base.lproj/UIChatCell.xib | 42 +++++++++---------- Classes/LinphoneUI/UIChatNotifiedEventCell.m | 2 +- Resources/fr.lproj/Localizable.strings | Bin 57084 -> 57096 bytes 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Classes/ChatConversationTableView.m b/Classes/ChatConversationTableView.m index ed18f9144..458ea6364 100644 --- a/Classes/ChatConversationTableView.m +++ b/Classes/ChatConversationTableView.m @@ -422,7 +422,7 @@ static const CGFloat MESSAGE_SPACING_PERCENTAGE = 1.f; LinphoneEventLog *event = [v pointerValue]; if (linphone_event_log_get_type(event) == LinphoneEventLogTypeConferenceChatMessage) { LinphoneChatMessage *msg = linphone_event_log_get_chat_message(event); - if (linphone_chat_message_is_outgoing(msg) && linphone_chat_message_is_ephemeral(msg)) { + if (linphone_chat_message_is_ephemeral(msg)) { UIChatBubbleTextCell *cell = (UIChatBubbleTextCell *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:[eventList indexOfObject:v] inSection:0]]; long duration = linphone_chat_message_get_ephemeral_expire_time(msg) == 0 ? linphone_chat_room_get_ephemeral_lifetime(linphone_chat_message_get_chat_room(msg)) : diff --git a/Classes/LinphoneUI/Base.lproj/UIChatCell.xib b/Classes/LinphoneUI/Base.lproj/UIChatCell.xib index ea61f9e49..67257c9d5 100644 --- a/Classes/LinphoneUI/Base.lproj/UIChatCell.xib +++ b/Classes/LinphoneUI/Base.lproj/UIChatCell.xib @@ -49,8 +49,27 @@ + + + - - - - + diff --git a/Classes/LinphoneUI/UIChatNotifiedEventCell.m b/Classes/LinphoneUI/UIChatNotifiedEventCell.m index 510d07e93..caf576a93 100644 --- a/Classes/LinphoneUI/UIChatNotifiedEventCell.m +++ b/Classes/LinphoneUI/UIChatNotifiedEventCell.m @@ -152,7 +152,7 @@ static const CGFloat NOTIFIED_CELL_HEIGHT = 44; break; } case LinphoneEventLogTypeConferenceEphemeralMessageEnabled: { - eventString = [NSString stringWithFormat:NSLocalizedString(@"You enabled ephemeral messages", nil)]; + eventString = [NSString stringWithFormat:NSLocalizedString(@"You enabled ephemeral messages: %@", nil),[self formatEphemeralExpiration:linphone_event_log_get_ephemeral_message_lifetime(event)]]; break; } case LinphoneEventLogTypeConferenceEphemeralMessageLifetimeChanged: { diff --git a/Resources/fr.lproj/Localizable.strings b/Resources/fr.lproj/Localizable.strings index 98505bc0a52cc419c395ad4776d5ad45a896e680..b119be4b7285149ae778d8e5445b958e36e3a61d 100644 GIT binary patch delta 78 zcmeyfm$_pf^9Hti+*S+<45|zc3`z{PlM6SCPgb~RHTm5=zR8#Fs7-FWrzYsa@RA{i aA(0^ys4j&;ogsDd+IzZu2wm0;Tnqp#nHNw1 delta 35 tcmV+;0NnqGz61Qd1F#0(lW5%