mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-03 22:35:45 +02:00
ongoingcall: show chatview when receiving new interaction
Change-Id: I97c5f42ab622bb87666203a251915dbbb5b5d84d GitLab: #429
This commit is contained in:
parent
4363917140
commit
e8edb15350
3 changed files with 18 additions and 0 deletions
|
@ -300,6 +300,12 @@ Rectangle {
|
|||
|
||||
anchors.fill: parent
|
||||
|
||||
function toggleConversation() {
|
||||
inCallMessageWebViewStack.visible ?
|
||||
closeInCallConversation() :
|
||||
openInCallConversation()
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: CallAdapter
|
||||
|
||||
|
@ -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: {
|
||||
inCallMessageWebViewStack.visible ?
|
||||
closeInCallConversation() :
|
||||
|
|
|
@ -487,6 +487,7 @@ MessagesAdapter::newInteraction(const QString& accountId,
|
|||
auto& convModel = accountInfo.conversationModel;
|
||||
convModel->clearUnreadInteractions(convUid);
|
||||
printNewInteraction(*convModel, interactionId, interaction);
|
||||
Q_EMIT newInteraction(static_cast<int>(interaction.type));
|
||||
} catch (...) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,6 +95,7 @@ Q_SIGNALS:
|
|||
void contactBanned();
|
||||
void navigateToWelcomePageRequested();
|
||||
void invitationAccepted();
|
||||
void newInteraction(int type);
|
||||
|
||||
public Q_SLOTS:
|
||||
void slotSendMessageContentSaved(const QString& content);
|
||||
|
|
Loading…
Add table
Reference in a new issue