diff --git a/src/app/mainview/ConversationView.qml b/src/app/mainview/ConversationView.qml index 299602464c8920bb3d7609e7060fe310c9df01fc..04414def7643c13df2b918f50cda62403f7cdfdf 100644 --- a/src/app/mainview/ConversationView.qml +++ b/src/app/mainview/ConversationView.qml @@ -65,8 +65,15 @@ ListSelectionView { id: chatView anchors.fill: parent + // Use callStackView.chatViewContainer only when hasCall is true + // and callStackView.chatViewContainer not null. + // Because after a swarm call ends, callStackView.chatViewContainer might not be null + // due to a lack of call state change signals for the swarm call. + readonly property bool hasCall: CurrentConversation.hasCall + readonly property var inCallChatContainer: hasCall ? callStackView.chatViewContainer : null + // Parent the chat view to the call stack view when in call. - parent: callStackView.chatViewContainer ? callStackView.chatViewContainer : chatViewContainer + parent: inCallChatContainer ? inCallChatContainer : chatViewContainer inCallView: parent === callStackView.chatViewContainer readonly property string currentConvId: CurrentConversation.id diff --git a/src/libclient/callmodel.cpp b/src/libclient/callmodel.cpp index 83513d5000739af8d5a692a04fcf93f7db851a12..373c0f3a50caeb1f8fa34ca8aa58bd3cee67be51 100644 --- a/src/libclient/callmodel.cpp +++ b/src/libclient/callmodel.cpp @@ -186,6 +186,7 @@ public: Lrc& lrc; QList<call::PendingConferenceeInfo> pendingConferencees_; + QString waitForConference_ {}; public Q_SLOTS: /** @@ -398,7 +399,11 @@ CallModel::createCall(const QString& uri, bool isAudioOnly, VectorMapStringStrin #endif // ENABLE_LIBWRAP if (callId.isEmpty()) { - qDebug() << "no call placed between (account: " << owner.id << ", contact: " << uri << ")"; + if (uri.startsWith("swarm:")) { + pimpl_->waitForConference_ = uri; + return {}; + } + qWarning() << "no call placed between (account: " << owner.id << ", contact: " << uri << ")"; return ""; } @@ -1735,6 +1740,10 @@ CallModelPimpl::slotConferenceCreated(const QString& accountId, const QString& c QString currentCallId = currentCall_; if (!conversationId.isEmpty()) { Q_EMIT linked.callAddedToConference("", conversationId, confId); + if (currentCall_ != confId && waitForConference_.contains(conversationId)) { + currentCall_ = confId; + Q_EMIT linked.currentCallChanged(confId); + } } else { QStringList callList = CallManager::instance().getParticipantList(linked.owner.id, confId); Q_FOREACH (const auto& call, callList) {