Commit 8ee2678f authored by Anthony Léonard's avatar Anthony Léonard Committed by Olivier Soldano

improve name display in call view

Both incoming call view and in-call view were displaying the ringID of
the contact instead of its best name. This is now fixed and more user
friendly.

Plus, two non-necessary constraints in incoming call view are removed.
This gives a better aligment of textfields when using a language other
than english.

Change-Id: I675c95b5f996b3fa8853554f14c0ed0aab44be87
Reviewed-by: default avatarOlivier Soldano <olivier.soldano@savoirfairelinux.com>
parent 6f81975f
......@@ -213,7 +213,9 @@
auto currentCall = callModel->getCall(callUid_);
NSLog(@"\n status %@ \n",@(lrc::api::call::to_string(currentCall.status).c_str()));
[personLabel setStringValue:@(currentCall.peer.c_str())];
auto convIt = getConversationFromUid(convUid_, *accountInfo_->conversationModel);
if (convIt != accountInfo_->conversationModel->allFilteredConversations().end())
[personLabel setStringValue:bestNameForConversation(*convIt, *accountInfo_->conversationModel)];
[timeSpentLabel setStringValue:@(callModel->getFormattedCallDuration(callUid_).c_str())];
[timeSpentLabel setHidden:NO];
if (refreshDurationTimer == nil)
......@@ -298,7 +300,7 @@
auto& imgManip = reinterpret_cast<Interfaces::ImageManipulationDelegate&>(GlobalInstances::pixmapManipulator());
QVariant photo = imgManip.conversationPhoto(*it, *accountInfo_);
[incomingPersonPhoto setImage:QtMac::toNSImage(qvariant_cast<QPixmap>(photo))];
[incomingDisplayName setStringValue:@(call.peer.c_str())];
[incomingDisplayName setStringValue:bestNameForConversation(*it, *convModel)];
}
}
......
......@@ -559,9 +559,6 @@
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qnn-D2-O1C">
<rect key="frame" x="139" y="121" width="127" height="17"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="123" id="hbP-yf-u6W"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="wants to talk to you!" id="X0W-vv-xua">
<font key="font" metaFont="system"/>
<color key="textColor" name="windowFrameColor" catalog="System" colorSpace="catalog"/>
......@@ -578,9 +575,6 @@
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="V2C-DZ-Ygi">
<rect key="frame" x="127" y="146" width="150" height="17"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="33" id="4iv-3m-Ldv"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" placeholderString="Incoming Display Name" id="EA3-Q5-Dyj">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
......
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