mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-23 08:13:51 +02:00
callpages: consume currentconversation observables
Change-Id: Ib8a1cf6fe3ba90c973c89e4806cfd3d6da1aa390
This commit is contained in:
parent
2ee3ec078b
commit
9d6fe53f40
2 changed files with 12 additions and 18 deletions
|
@ -93,7 +93,6 @@ Rectangle {
|
||||||
} else {
|
} else {
|
||||||
callStackMainView.pop(itemToFind, StackView.Immediate)
|
callStackMainView.pop(itemToFind, StackView.Immediate)
|
||||||
}
|
}
|
||||||
initialCallPage.accountConvPair = [responsibleAccountId, responsibleConvUid]
|
|
||||||
initialCallPage.callStatus = callState
|
initialCallPage.callStatus = callState
|
||||||
initialCallPage.isAudioOnly = isAudioOnly
|
initialCallPage.isAudioOnly = isAudioOnly
|
||||||
if (initialCallPage.callStatus === Call.Status.INCOMING_RINGING)
|
if (initialCallPage.callStatus === Call.Status.INCOMING_RINGING)
|
||||||
|
|
|
@ -34,9 +34,7 @@ Rectangle {
|
||||||
|
|
||||||
property bool isIncoming: false
|
property bool isIncoming: false
|
||||||
property bool isAudioOnly: false
|
property bool isAudioOnly: false
|
||||||
property var accountConvPair: ["", ""]
|
|
||||||
property int callStatus: 0
|
property int callStatus: 0
|
||||||
property string bestName: ""
|
|
||||||
|
|
||||||
signal callCanceled
|
signal callCanceled
|
||||||
signal callAccepted
|
signal callAccepted
|
||||||
|
@ -58,13 +56,6 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onAccountConvPairChanged: {
|
|
||||||
if (accountConvPair[1]) {
|
|
||||||
contactImg.imageId = accountConvPair[1]
|
|
||||||
root.bestName = UtilsAdapter.getBestName(accountConvPair[0], accountConvPair[1])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Prevent right click propagate to VideoCallPage.
|
// Prevent right click propagate to VideoCallPage.
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -78,14 +69,13 @@ Rectangle {
|
||||||
anchors.verticalCenter: root.verticalCenter
|
anchors.verticalCenter: root.verticalCenter
|
||||||
|
|
||||||
ConversationAvatar {
|
ConversationAvatar {
|
||||||
id: contactImg
|
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.preferredWidth: JamiTheme.avatarSizeInCall
|
Layout.preferredWidth: JamiTheme.avatarSizeInCall
|
||||||
Layout.preferredHeight: JamiTheme.avatarSizeInCall
|
Layout.preferredHeight: JamiTheme.avatarSizeInCall
|
||||||
|
|
||||||
showPresenceIndicator: false
|
showPresenceIndicator: false
|
||||||
animationMode: SpinningAnimation.Mode.Radial
|
animationMode: SpinningAnimation.Mode.Radial
|
||||||
|
imageId: CurrentConversation.id
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
@ -98,11 +88,15 @@ Rectangle {
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
|
property string title: CurrentConversation.title
|
||||||
|
|
||||||
text: {
|
text: {
|
||||||
if (root.isIncoming)
|
if (root.isIncoming)
|
||||||
return root.isAudioOnly ? JamiStrings.incomingAudioCallFrom.replace("{}", root.bestName) : JamiStrings.incomingVideoCallFrom.replace("{}", root.bestName)
|
return root.isAudioOnly ?
|
||||||
|
JamiStrings.incomingAudioCallFrom.replace("{}", title) :
|
||||||
|
JamiStrings.incomingVideoCallFrom.replace("{}", title)
|
||||||
else
|
else
|
||||||
return root.bestName
|
return title
|
||||||
}
|
}
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
@ -188,6 +182,7 @@ Rectangle {
|
||||||
font.kerning: true
|
font.kerning: true
|
||||||
color: actionButton.hovered ? JamiTheme.whiteColor : JamiTheme.whiteColorTransparent
|
color: actionButton.hovered ? JamiTheme.whiteColor : JamiTheme.whiteColorTransparent
|
||||||
|
|
||||||
|
|
||||||
text: {
|
text: {
|
||||||
if (type === "refuse")
|
if (type === "refuse")
|
||||||
return JamiStrings.refuse
|
return JamiStrings.refuse
|
||||||
|
@ -212,16 +207,16 @@ Rectangle {
|
||||||
Shortcut {
|
Shortcut {
|
||||||
sequence: "Ctrl+Y"
|
sequence: "Ctrl+Y"
|
||||||
context: Qt.ApplicationShortcut
|
context: Qt.ApplicationShortcut
|
||||||
onActivated: CallAdapter.acceptACall(root.accountConvPair[0],
|
onActivated: CallAdapter.acceptACall(CurrentAccount.id,
|
||||||
root.accountConvPair[1])
|
CurrentConversation.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
Shortcut {
|
Shortcut {
|
||||||
sequence: "Ctrl+Shift+D"
|
sequence: "Ctrl+Shift+D"
|
||||||
context: Qt.ApplicationShortcut
|
context: Qt.ApplicationShortcut
|
||||||
onActivated: {
|
onActivated: {
|
||||||
CallAdapter.hangUpACall(root.accountConvPair[0],
|
CallAdapter.hangUpACall(CurrentAccount.id,
|
||||||
root.accountConvPair[1])
|
CurrentConversation.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue