Only create a chatroom for the current call when the chat button is pressed (fix #LINQT-2228)

This commit is contained in:
Gaelle Braud 2025-12-01 10:35:03 +01:00
parent f405754e24
commit dfc88b7657

View file

@ -23,7 +23,7 @@ AbstractWindow {
property bool isConference: call ? call.core.isConference : false property bool isConference: call ? call.core.isConference : false
// Chat related to call // Chat related to call
property var chatObj: UtilsCpp.getCurrentCallChat(mainWindow.call) property var chatObj
property ChatGui chat: chatObj ? chatObj.value : null property ChatGui chat: chatObj ? chatObj.value : null
property int conferenceLayout: call && call.core.conferenceVideoLayout || 0 property int conferenceLayout: call && call.core.conferenceVideoLayout || 0
@ -1454,8 +1454,7 @@ AbstractWindow {
Layout.preferredHeight: Utils.getSizeWithScreenRatio(55) Layout.preferredHeight: Utils.getSizeWithScreenRatio(55)
icon.width: Utils.getSizeWithScreenRatio(32) icon.width: Utils.getSizeWithScreenRatio(32)
icon.height: Utils.getSizeWithScreenRatio(32) icon.height: Utils.getSizeWithScreenRatio(32)
onClicked: mainWindow.call.core.lSetLocalVideoEnabled( onClicked: mainWindow.call.core.lSetLocalVideoEnabled(!mainWindow.call.core.localVideoEnabled)
!mainWindow.call.core.localVideoEnabled)
} }
// Audio microphone button // Audio microphone button
@ -1522,6 +1521,7 @@ AbstractWindow {
onToggled: { onToggled: {
if (checked) { if (checked) {
rightPanel.visible = true rightPanel.visible = true
mainWindow.chatObj = UtilsCpp.getCurrentCallChat(mainWindow.call)
rightPanel.replace(chatPanel) rightPanel.replace(chatPanel)
} else { } else {
rightPanel.visible = false rightPanel.visible = false