add loader to the call status icon so it is changed properly when call state changes #LINQT-2303

This commit is contained in:
Gaelle Braud 2026-01-12 17:57:29 +01:00
parent 6890362c41
commit 7b7d382cc6

View file

@ -353,16 +353,20 @@ AbstractWindow {
spacing: Utils.getSizeWithScreenRatio(10)
RowLayout {
spacing: Utils.getSizeWithScreenRatio(10)
EffectImage {
id: callStatusIcon
Loader {
id: callStatusIconLoader
Layout.preferredWidth: Utils.getSizeWithScreenRatio(30)
Layout.preferredHeight: Utils.getSizeWithScreenRatio(30)
sourceComponent: EffectImage {
id: callStatusIcon
anchors.fill: parent
// TODO : change with broadcast or meeting icon when available
// onImageSourceChanged: console.log("image source changed", imageSource)
imageSource: !mainWindow.call
? AppIcons.meeting
: (mainWindow.callState === LinphoneEnums.CallState.End || mainWindow.callState === LinphoneEnums.CallState.Released)
? AppIcons.endCall
: (mainWindow.callState === LinphoneEnums.CallState.Paused || mainWindow.callState === LinphoneEnums.CallState.PausedByRemote)
: (mainWindow.call.core.paused || mainWindow.callState === LinphoneEnums.CallState.Paused || mainWindow.callState === LinphoneEnums.CallState.PausedByRemote)
? AppIcons.pause
: mainWindow.conference
? AppIcons.usersThree
@ -381,6 +385,20 @@ AbstractWindow {
=== LinphoneEnums.CallState.Released
|| mainWindow.conference ? DefaultStyle.danger_500_main : mainWindow.call.core.dir === LinphoneEnums.CallDir.Outgoing ? DefaultStyle.info_500_main : DefaultStyle.success_500_main
Binding {
target: callStatusIcon
when: middleItemStackView.currentItem.objectName === "waitingRoom"
property: "imageSource"
value: AppIcons.usersThree
}
}
Connections {
target: mainWindow
function onCallStateChanged() {
callStatusIconLoader.active = !callStatusIconLoader.active
callStatusIconLoader.active = !callStatusIconLoader.active
}
}
}
ColumnLayout {
spacing: Utils.getSizeWithScreenRatio(6)
@ -1273,12 +1291,6 @@ AbstractWindow {
rightPanel.visible = false
}
}
Binding {
target: callStatusIcon
when: middleItemStackView.currentItem.objectName === "waitingRoom"
property: "imageSource"
value: AppIcons.usersThree
}
Binding {
target: callStatusText
when: middleItemStackView.currentItem.objectName === "waitingRoom"