fix call proxy connect already connected to call list model when model changes...

This commit is contained in:
Gaëlle Braud 2025-02-27 18:02:34 +00:00
parent 5853314f28
commit d9fcdf6af6
3 changed files with 80 additions and 82 deletions

View file

@ -26,8 +26,6 @@
DEFINE_ABSTRACT_OBJECT(CallProxy)
CallProxy::CallProxy(QObject *parent) : LimitProxy(parent) {
connect(this, &CallProxy::sourceModelChanged, this, &CallProxy::resetCurrentCall);
connect(this, &CallProxy::sourceModelChanged, this, &CallProxy::haveCallChanged);
}
CallProxy::~CallProxy() {

View file

@ -486,8 +486,8 @@ ConferenceInfoGui{
Component {
id: contactDetailComp
FocusScope {
width: parent?.width
height: parent?.height
// width: parent?.width
// height: parent?.height
CallHistoryLayout {
id: contactDetail
anchors.fill: parent
@ -605,12 +605,15 @@ ConferenceInfoGui{
}
}
}
detailContent: RoundedPane {
id: detailControl
detailContent: Item {
Layout.preferredWidth: 360 * DefaultStyle.dp
Layout.fillHeight: true
// height: Math.min(430 * DefaultStyle.dp, detailListView.contentHeight) + topPadding + bottomPadding
RoundedPane {
id: detailControl
width: parent.width
height: Math.min(
parent.height,
detailListView.contentHeight) + topPadding + bottomPadding
background: Rectangle {
id: detailListBackground
anchors.fill: parent
@ -653,18 +656,13 @@ ConferenceInfoGui{
id: statusIcon
imageSource: modelData.core.status
=== LinphoneEnums.CallStatus.Declined
|| 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.DeclinedElsewhere || 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
Layout.preferredWidth: 16 * DefaultStyle.dp
Layout.preferredHeight: 16 * DefaultStyle.dp
transform: Rotation {
angle: modelData.core.isOutgoing
&& (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
&& (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
origin {
x: statusIcon.width / 2
y: statusIcon.height / 2
@ -695,7 +693,8 @@ ConferenceInfoGui{
}
Text {
text: UtilsCpp.formatElapsedTime(
modelData.core.duration, false)
modelData.core.duration,
false)
font {
pixelSize: 12 * DefaultStyle.dp
weight: 300 * DefaultStyle.dp
@ -705,6 +704,7 @@ ConferenceInfoGui{
}
}
}
}
Item {
Layout.fillHeight: true
}

View file

@ -104,7 +104,7 @@ AbstractWindow {
// mainWin.goToCallHistory()
}
function callEnded(call) {
if (call.core.state === LinphoneEnums.CallState.Error) {
if (call && call.core.state === LinphoneEnums.CallState.Error) {
middleItemStackView.replace(inCallItem)
}
if (!callsModel.haveCall) {