diff --git a/src/calladapter.cpp b/src/calladapter.cpp index 6690934f..6d537d78 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 582a0b32..6ee2435f 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 3cae7564..0aa36c03 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()