Skip to content
Snippets Groups Projects
Commit fdc5af12 authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

calling-views: use currentconversation for ids/names

Prevents out of date monikers visible within the incoming and
outgoing call views.

Change-Id: Ic5154b1aa694d31e2504c55cdb5f1a1eaa99cfa2
parent 804ff2ac
No related branches found
No related tags found
No related merge requests found
......@@ -655,9 +655,6 @@ CallAdapter::updateCallOverlay(const lrc::api::conversation::Info& convInfo)
bool isConferenceCall = !convInfo.confId.isEmpty()
|| (convInfo.confId.isEmpty() && call->participantsInfos.size() != 0);
bool isGrid = call->layout == lrc::api::call::Layout::GRID;
auto bestName = convInfo.participants.isEmpty()
? QString()
: accInfo.contactModel->bestNameForContact(convInfo.participants[0]);
Q_EMIT updateOverlay(isPaused,
isAudioOnly,
......@@ -666,8 +663,7 @@ CallAdapter::updateCallOverlay(const lrc::api::conversation::Info& convInfo)
isRecording,
accInfo.profileInfo.type == lrc::api::profile::Type::SIP,
isConferenceCall,
isGrid,
bestName);
isGrid);
}
void
......
......@@ -100,8 +100,7 @@ Q_SIGNALS:
bool isRecording,
bool isSIP,
bool isConferenceCall,
bool isGrid,
const QString& bestName);
bool isGrid);
void remoteRecordingChanged(const QStringList& peers, bool state);
void eraseRemoteRecording();
......
......@@ -46,8 +46,6 @@ Item {
property bool isConferenceCall
property bool isGrid
property string bestName: ""
signal chatButtonClicked
ParticipantsLayer {
......@@ -187,8 +185,6 @@ Item {
anchors.fill: parent
bestName: root.bestName
Connections {
target: mainOverlay.callActionBar
function onChatClicked() { root.chatButtonClicked() }
......
......@@ -34,8 +34,6 @@ Item {
property string timeText: "00:00"
property string remoteRecordingLabel: ""
property string bestName: ""
property alias recordingVisible: recordingRect.visible
property alias callActionBar: __callActionBar
......@@ -120,7 +118,7 @@ Item {
text: {
if (!root.isAudioOnly) {
if (remoteRecordingLabel === "") {
return root.bestName
return CurrentConversation.title
} else {
return remoteRecordingLabel
}
......
......@@ -33,8 +33,6 @@ Rectangle {
id: root
property var accountPeerPair: ["", ""]
property alias bestName: callOverlay.bestName
property string bestId: "Best Id"
property variant clickPos: "1,1"
property int previewMargin: 15
property int previewMarginYTop: previewMargin + 42
......@@ -52,12 +50,6 @@ Rectangle {
return
contactImage.imageId = accountPeerPair[1]
callOverlay.participantsLayer.update(CallAdapter.getConferencesInfos())
bestName = UtilsAdapter.getBestName(accountPeerPair[0],
accountPeerPair[1])
var id = UtilsAdapter.getBestId(accountPeerPair[0], accountPeerPair[1])
bestId = (bestName !== id) ? id : ""
root.callId = UtilsAdapter.getCallId(accountPeerPair[0],
accountPeerPair[1])
}
......@@ -85,12 +77,6 @@ Rectangle {
}
function handleParticipantsInfo(infos) {
if (infos.length === 0) {
bestName = UtilsAdapter.getBestName(LRCInstance.currentAccountId,
LRCInstance.selectedConvUid)
} else {
bestName = ""
}
callOverlay.participantsLayer.update(infos)
}
......@@ -292,17 +278,17 @@ Rectangle {
anchors.fill: parent
function toggleConversation() {
inCallMessageWebViewStack.visible ?
closeInCallConversation() :
openInCallConversation()
if (inCallMessageWebViewStack.visible)
closeInCallConversation()
else
openInCallConversation()
}
Connections {
target: CallAdapter
function onUpdateOverlay(isPaused, isAudioOnly, isAudioMuted, isVideoMuted,
isRecording, isSIP, isConferenceCall, isGrid,
bestName) {
isRecording, isSIP, isConferenceCall, isGrid) {
callOverlay.showOnHoldImage(isPaused)
root.isAudioOnly = isAudioOnly
audioCallPageRectCentralRect.visible = !isPaused && root.isAudioOnly
......@@ -310,7 +296,6 @@ Rectangle {
isAudioMuted, isVideoMuted,
isRecording, isSIP,
isConferenceCall, isGrid)
root.bestName = bestName
callOverlay.participantsLayer.update(CallAdapter.getConferencesInfos())
}
......@@ -375,22 +360,7 @@ Rectangle {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: root.bestName
elide: Text.ElideMiddle
color: "white"
}
Text {
Layout.alignment: Qt.AlignCenter
Layout.topMargin: JamiTheme.preferredMarginSize
Layout.preferredWidth: root.width
font.pointSize: JamiTheme.textFontSize
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: root.bestId
text: CurrentConversation.title
elide: Text.ElideMiddle
color: "white"
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment