try to fix crash in polishItems when changing conference layout

This commit is contained in:
Gaelle Braud 2026-03-18 17:17:11 +01:00
parent 0de5964883
commit 4fca033943

View file

@ -50,19 +50,21 @@ Item {
}
function setConferenceLayout() {
callLayout.sourceComponent = undefined // unload old view before opening the new view to avoid conflicts in Video UI.
// If stop sharing screen, reset conference layout to the previous one
if (mainItem.conference && !mainItem.conference.core.isLocalScreenSharing && mainItem.lastConfLayoutBeforeSharing !== -1) {
mainItem.conferenceLayout = mainItem.lastConfLayoutBeforeSharing
mainItem.lastConfLayoutBeforeSharing = -1
}
callLayout.sourceComponent = conference
? conference.core.isScreenSharingEnabled || (mainItem.conferenceLayout == LinphoneEnums.ConferenceLayout.ActiveSpeaker && participantDeviceCount > 1)
? activeSpeakerComponent
: participantDeviceCount <= 1
? waitingForOthersComponent
: gridComponent
: activeSpeakerComponent
Qt.callLater(function() {
callLayout.sourceComponent = undefined // unload old view before opening the new view to avoid conflicts in Video UI.
// If stop sharing screen, reset conference layout to the previous one
if (mainItem.conference && !mainItem.conference.core.isLocalScreenSharing && mainItem.lastConfLayoutBeforeSharing !== -1) {
mainItem.conferenceLayout = mainItem.lastConfLayoutBeforeSharing
mainItem.lastConfLayoutBeforeSharing = -1
}
callLayout.sourceComponent = conference
? conference.core.isScreenSharingEnabled || (mainItem.conferenceLayout == LinphoneEnums.ConferenceLayout.ActiveSpeaker && participantDeviceCount > 1)
? activeSpeakerComponent
: participantDeviceCount <= 1
? waitingForOthersComponent
: gridComponent
: activeSpeakerComponent
})
}
Text {