Skip to content
Snippets Groups Projects
Commit e8edb153 authored by Sébastien Blin's avatar Sébastien Blin Committed by Andreas Traczyk
Browse files

ongoingcall: show chatview when receiving new interaction

Change-Id: I97c5f42ab622bb87666203a251915dbbb5b5d84d
GitLab: #429
parent 43639171
No related branches found
No related tags found
No related merge requests found
...@@ -300,6 +300,12 @@ Rectangle { ...@@ -300,6 +300,12 @@ Rectangle {
anchors.fill: parent anchors.fill: parent
function toggleConversation() {
inCallMessageWebViewStack.visible ?
closeInCallConversation() :
openInCallConversation()
}
Connections { Connections {
target: CallAdapter target: CallAdapter
...@@ -330,6 +336,16 @@ Rectangle { ...@@ -330,6 +336,16 @@ Rectangle {
} }
} }
Connections {
target: MessagesAdapter
function onNewInteraction(interactionType) {
// Ignore call notifications, as we are in the call.
if (interactionType !== Interaction.Type.CALL && !inCallMessageWebViewStack.visible)
openInCallConversation()
}
}
onChatButtonClicked: { onChatButtonClicked: {
inCallMessageWebViewStack.visible ? inCallMessageWebViewStack.visible ?
closeInCallConversation() : closeInCallConversation() :
......
...@@ -487,6 +487,7 @@ MessagesAdapter::newInteraction(const QString& accountId, ...@@ -487,6 +487,7 @@ MessagesAdapter::newInteraction(const QString& accountId,
auto& convModel = accountInfo.conversationModel; auto& convModel = accountInfo.conversationModel;
convModel->clearUnreadInteractions(convUid); convModel->clearUnreadInteractions(convUid);
printNewInteraction(*convModel, interactionId, interaction); printNewInteraction(*convModel, interactionId, interaction);
Q_EMIT newInteraction(static_cast<int>(interaction.type));
} catch (...) { } catch (...) {
} }
} }
......
...@@ -95,6 +95,7 @@ Q_SIGNALS: ...@@ -95,6 +95,7 @@ Q_SIGNALS:
void contactBanned(); void contactBanned();
void navigateToWelcomePageRequested(); void navigateToWelcomePageRequested();
void invitationAccepted(); void invitationAccepted();
void newInteraction(int type);
public Q_SLOTS: public Q_SLOTS:
void slotSendMessageContentSaved(const QString& content); void slotSendMessageContentSaved(const QString& content);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment