diff --git a/src/calladapter.cpp b/src/calladapter.cpp index 6690934fd330769b11785834229f4aeee6c06f17..6d537d78df7cd951caa996541718d85ed958ce98 100644 --- a/src/calladapter.cpp +++ b/src/calladapter.cpp @@ -232,6 +232,9 @@ CallAdapter::onShowIncomingCallView(const QString& accountId, const QString& con if (call.isOutgoing) { if (isCallSelected) { // don't reselect + // TODO: this signal can be renamed to conversationReselected, + // isCallSelected and any other similar logic can be removed + // and calling selectConversation should be sufficient Q_EMIT lrcInstance_->conversationUpdated(convInfo.uid, accountId); } } else { diff --git a/src/lrcinstance.cpp b/src/lrcinstance.cpp index 582a0b32dc4f019e70d2d9e7771f33d1ae5df1eb..6ee2435fd362beed4de7845975955901809264a7 100644 --- a/src/lrcinstance.cpp +++ b/src/lrcinstance.cpp @@ -434,6 +434,11 @@ LRCInstance::poplastConference(const QString& confId) void LRCInstance::selectConversation(const QString& convId, const QString& accountId) { + // reselection can be used to update the conversation + if (convId == selectedConvUid_ && accountId == currentAccountId_) { + Q_EMIT conversationUpdated(convId, accountId); + return; + } // if the account is not currently selected, do that first, then // proceed to select the conversation if (!accountId.isEmpty() && accountId != getCurrentAccountId()) { diff --git a/src/mainview/MainView.qml b/src/mainview/MainView.qml index 3cae75648be2f42bade1989e6a22cde8fdec43f1..0aa36c031160a4a90dbbf8f9202e6c79ae463ff4 100644 --- a/src/mainview/MainView.qml +++ b/src/mainview/MainView.qml @@ -138,7 +138,7 @@ Rectangle { if (checkCurrentCall && currentAccountIsCalling()) { var callConv = UtilsAdapter.getCallConvForAccount( LRCInstance.currentAccountId) - LRCInstance.selectConversation(callConv) + LRCInstance.selectConversation(callConv, currentAccountId) CallAdapter.updateCall(callConv, currentAccountId) } else { showWelcomeView()