fix call proxy connect already connected to call list model when model changes...
This commit is contained in:
parent
5853314f28
commit
d9fcdf6af6
3 changed files with 80 additions and 82 deletions
|
|
@ -26,8 +26,6 @@
|
||||||
DEFINE_ABSTRACT_OBJECT(CallProxy)
|
DEFINE_ABSTRACT_OBJECT(CallProxy)
|
||||||
|
|
||||||
CallProxy::CallProxy(QObject *parent) : LimitProxy(parent) {
|
CallProxy::CallProxy(QObject *parent) : LimitProxy(parent) {
|
||||||
connect(this, &CallProxy::sourceModelChanged, this, &CallProxy::resetCurrentCall);
|
|
||||||
connect(this, &CallProxy::sourceModelChanged, this, &CallProxy::haveCallChanged);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CallProxy::~CallProxy() {
|
CallProxy::~CallProxy() {
|
||||||
|
|
|
||||||
|
|
@ -486,8 +486,8 @@ ConferenceInfoGui{
|
||||||
Component {
|
Component {
|
||||||
id: contactDetailComp
|
id: contactDetailComp
|
||||||
FocusScope {
|
FocusScope {
|
||||||
width: parent?.width
|
// width: parent?.width
|
||||||
height: parent?.height
|
// height: parent?.height
|
||||||
CallHistoryLayout {
|
CallHistoryLayout {
|
||||||
id: contactDetail
|
id: contactDetail
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -605,12 +605,15 @@ ConferenceInfoGui{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
detailContent: RoundedPane {
|
detailContent: Item {
|
||||||
id: detailControl
|
|
||||||
Layout.preferredWidth: 360 * DefaultStyle.dp
|
Layout.preferredWidth: 360 * DefaultStyle.dp
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
RoundedPane {
|
||||||
// height: Math.min(430 * DefaultStyle.dp, detailListView.contentHeight) + topPadding + bottomPadding
|
id: detailControl
|
||||||
|
width: parent.width
|
||||||
|
height: Math.min(
|
||||||
|
parent.height,
|
||||||
|
detailListView.contentHeight) + topPadding + bottomPadding
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
id: detailListBackground
|
id: detailListBackground
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -653,18 +656,13 @@ ConferenceInfoGui{
|
||||||
id: statusIcon
|
id: statusIcon
|
||||||
imageSource: modelData.core.status
|
imageSource: modelData.core.status
|
||||||
=== LinphoneEnums.CallStatus.Declined
|
=== LinphoneEnums.CallStatus.Declined
|
||||||
|| modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere
|
|| modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere || modelData.core.status === LinphoneEnums.CallStatus.Aborted || modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted ? AppIcons.arrowElbow : modelData.core.isOutgoing ? AppIcons.arrowUpRight : AppIcons.arrowDownLeft
|
||||||
|| modelData.core.status
|
|
||||||
=== LinphoneEnums.CallStatus.Aborted
|
|
||||||
|| modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted ? AppIcons.arrowElbow : modelData.core.isOutgoing ? AppIcons.arrowUpRight : AppIcons.arrowDownLeft
|
|
||||||
colorizationColor: modelData.core.status === LinphoneEnums.CallStatus.Declined || modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere || modelData.core.status === LinphoneEnums.CallStatus.Aborted || modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted || modelData.core.status === LinphoneEnums.CallStatus.Missed ? DefaultStyle.danger_500main : modelData.core.isOutgoing ? DefaultStyle.info_500_main : DefaultStyle.success_500main
|
colorizationColor: modelData.core.status === LinphoneEnums.CallStatus.Declined || modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere || modelData.core.status === LinphoneEnums.CallStatus.Aborted || modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted || modelData.core.status === LinphoneEnums.CallStatus.Missed ? DefaultStyle.danger_500main : modelData.core.isOutgoing ? DefaultStyle.info_500_main : DefaultStyle.success_500main
|
||||||
Layout.preferredWidth: 16 * DefaultStyle.dp
|
Layout.preferredWidth: 16 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 16 * DefaultStyle.dp
|
Layout.preferredHeight: 16 * DefaultStyle.dp
|
||||||
transform: Rotation {
|
transform: Rotation {
|
||||||
angle: modelData.core.isOutgoing
|
angle: modelData.core.isOutgoing
|
||||||
&& (modelData.core.status
|
&& (modelData.core.status === LinphoneEnums.CallStatus.Declined || modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere || modelData.core.status === LinphoneEnums.CallStatus.Aborted || modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted) ? 180 : 0
|
||||||
=== LinphoneEnums.CallStatus.Declined
|
|
||||||
|| modelData.core.status === LinphoneEnums.CallStatus.DeclinedElsewhere || modelData.core.status === LinphoneEnums.CallStatus.Aborted || modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted) ? 180 : 0
|
|
||||||
origin {
|
origin {
|
||||||
x: statusIcon.width / 2
|
x: statusIcon.width / 2
|
||||||
y: statusIcon.height / 2
|
y: statusIcon.height / 2
|
||||||
|
|
@ -695,7 +693,8 @@ ConferenceInfoGui{
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
text: UtilsCpp.formatElapsedTime(
|
text: UtilsCpp.formatElapsedTime(
|
||||||
modelData.core.duration, false)
|
modelData.core.duration,
|
||||||
|
false)
|
||||||
font {
|
font {
|
||||||
pixelSize: 12 * DefaultStyle.dp
|
pixelSize: 12 * DefaultStyle.dp
|
||||||
weight: 300 * DefaultStyle.dp
|
weight: 300 * DefaultStyle.dp
|
||||||
|
|
@ -705,6 +704,7 @@ ConferenceInfoGui{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Item {
|
Item {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ AbstractWindow {
|
||||||
// mainWin.goToCallHistory()
|
// mainWin.goToCallHistory()
|
||||||
}
|
}
|
||||||
function callEnded(call) {
|
function callEnded(call) {
|
||||||
if (call.core.state === LinphoneEnums.CallState.Error) {
|
if (call && call.core.state === LinphoneEnums.CallState.Error) {
|
||||||
middleItemStackView.replace(inCallItem)
|
middleItemStackView.replace(inCallItem)
|
||||||
}
|
}
|
||||||
if (!callsModel.haveCall) {
|
if (!callsModel.haveCall) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue