Commit c0292d91 authored by Christophe Deschamps's avatar Christophe Deschamps
Browse files

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
parent f0c5c073
Pipeline #30264 passed with stage
in 9 minutes and 14 seconds
......@@ -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)) :
......
......@@ -49,8 +49,27 @@
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="chat_read.png" translatesAutoresizingMaskIntoConstraints="NO" id="aa2-Kl-c1H" userLabel="imdmIcon">
<rect key="frame" x="69" y="55" width="13" height="13"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES"/>
<accessibility key="accessibilityConfiguration" label="Delivery failed">
<accessibilityTraits key="traits" button="YES" image="YES"/>
</accessibility>
</imageView>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" fixedFrame="YES" text="This is a placeholder message" lineBreakMode="tailTruncation" numberOfLines="2" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="21" userLabel="chatContentLabel">
<rect key="frame" x="85" y="43" width="239" height="37"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
<accessibility key="accessibilityConfiguration" label="Message"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="ephemeral_messages_color_A.png" translatesAutoresizingMaskIntoConstraints="NO" id="q18-yi-ol3">
<rect key="frame" x="338" y="51" width="21" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
</imageView>
<view hidden="YES" autoresizesSubviews="NO" userInteractionEnabled="NO" tag="7" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="7DE-KJ-9Q3" userLabel="unreadCountView" customClass="UIBouncingView">
<rect key="frame" x="350" y="12" width="21" height="21"/>
<rect key="frame" x="338" y="12" width="21" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" tag="8" contentMode="scaleAspectFit" fixedFrame="YES" image="chat_list_indicator.png" translatesAutoresizingMaskIntoConstraints="NO" id="NXj-A8-YLh" userLabel="unreadCountImage">
......@@ -71,29 +90,10 @@
</subviews>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="chat_read.png" translatesAutoresizingMaskIntoConstraints="NO" id="aa2-Kl-c1H" userLabel="imdmIcon">
<rect key="frame" x="69" y="55" width="13" height="13"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES"/>
<accessibility key="accessibilityConfiguration" label="Delivery failed">
<accessibilityTraits key="traits" button="YES" image="YES"/>
</accessibility>
</imageView>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" fixedFrame="YES" text="This is a placeholder message" lineBreakMode="tailTruncation" numberOfLines="2" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="21" userLabel="chatContentLabel">
<rect key="frame" x="85" y="43" width="262" height="37"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
<accessibility key="accessibilityConfiguration" label="Message"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="ephemeral_messages_color_A.png" translatesAutoresizingMaskIntoConstraints="NO" id="q18-yi-ol3">
<rect key="frame" x="350" y="59" width="21" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
</imageView>
</subviews>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="226.81159420289856" y="160.71428571428569"/>
<point key="canvasLocation" x="226.40000000000001" y="160.11994002998503"/>
</view>
</objects>
<resources>
......
......@@ -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: {
......
B" Your account is created. We have sent a confirmation email to %@. Please check your mails to validate your account. Once it is done, come back here and click on the button." = " Votre compte a été créé. Nous avons envoyé un email de confirmation à l'adresse : %@.\nPour valider votre compte, veuillez suivre les instructions reçues par email et cliquer sur le bouton.";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment