diff --git a/linphone-app/ui/modules/Linphone/Calls/Calls.js b/linphone-app/ui/modules/Linphone/Calls/Calls.js index 23c3b4325..32a275ec5 100644 --- a/linphone-app/ui/modules/Linphone/Calls/Calls.js +++ b/linphone-app/ui/modules/Linphone/Calls/Calls.js @@ -157,7 +157,7 @@ function getParams (call) { } function updateSelectedCall (call, index) { - calls._selectedCall = call + calls._selectedCall = call ? call : null if (index != null) { calls.currentIndex = index } diff --git a/linphone-app/ui/modules/Linphone/Calls/Calls.qml b/linphone-app/ui/modules/Linphone/Calls/Calls.qml index 510021fbc..c8348b32c 100644 --- a/linphone-app/ui/modules/Linphone/Calls/Calls.qml +++ b/linphone-app/ui/modules/Linphone/Calls/Calls.qml @@ -20,6 +20,8 @@ ListView { property CallModel _selectedCall: null + property var lastCall + onSelectedCallChanged: if( selectedCall) lastCall = selectedCall // --------------------------------------------------------------------------- boundsBehavior: Flickable.StopAtBounds @@ -27,7 +29,17 @@ ListView { spacing: 0 // --------------------------------------------------------------------------- - + function refreshCall(){ + Logic.resetSelectedCall() + } + function refreshLastCall(){ + if(lastCall && lastCall.status === CallModel.CallStatusConnected) + Logic.setIndexWithCall(lastCall) + else{ + var call = model.data(model.index(0, 0)) + Logic.updateSelectedCall(model.data(model.index(0, 0))) + } + } onCountChanged: Logic.handleCountChanged(count) Connections { diff --git a/linphone-app/ui/views/App/Calls/CallsWindow.js b/linphone-app/ui/views/App/Calls/CallsWindow.js index 6562e15e3..9df8466c4 100644 --- a/linphone-app/ui/views/App/Calls/CallsWindow.js +++ b/linphone-app/ui/views/App/Calls/CallsWindow.js @@ -58,6 +58,7 @@ function openConferenceManager (params, exitHandler) { } function openWaitingRoom(model){ + calls.refreshCall() if(window.conferenceInfoModel) window.conferenceInfoModel = null; window.conferenceInfoModel = model @@ -68,18 +69,24 @@ function openWaitingRoom(model){ function getContent (call, conferenceInfoModel) { console.log("Changing contents") if (call == null) { - if(conferenceInfoModel) + if(conferenceInfoModel) { + console.log("waitingRoom") return waitingRoom - else + } + else{ + console.log("null") return null + } } var status = call.status if (status == null) { + console.log(calls.conferenceModel.count > 0 ? "conference" : "null") return calls.conferenceModel.count > 0 ? conference : null } var CallModel = Linphone.CallModel if (status === CallModel.CallStatusIncoming) { + console.log("incomingCall") return incomingCall } window.conferenceInfoModel = call.conferenceInfoModel; @@ -88,9 +95,12 @@ function getContent (call, conferenceInfoModel) { return waitingRoom } - if(call.isConference) + if(call.isConference){ + console.log("incall") return incall - + } + + console.log("incall") return incall } @@ -131,7 +141,7 @@ function handleCallAttendedTransferAsked (call) { } function windowMustBeClosed () { - return Linphone.CallsListModel.rowCount() === 0 && !window.virtualWindowVisible + return Linphone.CallsListModel.rowCount() === 0 && !window.virtualWindowVisible && middlePane.sourceComponent != waitingRoom } function tryToCloseWindow () { diff --git a/linphone-app/ui/views/App/Calls/CallsWindow.qml b/linphone-app/ui/views/App/Calls/CallsWindow.qml index 7f68500ac..9ac192480 100644 --- a/linphone-app/ui/views/App/Calls/CallsWindow.qml +++ b/linphone-app/ui/views/App/Calls/CallsWindow.qml @@ -52,8 +52,10 @@ Window { function endOfProcess(exitValue){ window.detachVirtualWindow(); - if(exitValue == 0 && calls.count == 0) + if(exitValue == 0 && calls.count == 0 && middlePane.sourceComponent != waitingRoom) { + console.log("Closing") close(); + } } function openConferenceManager (params) { @@ -85,7 +87,7 @@ Window { maximumLeftLimit: CallsWindowStyle.callsList.maximumWidth minimumLeftLimit: CallsWindowStyle.callsList.minimumWidth - hideSplitter: !window.callsIsOpened && middlePane.sourceComponent == incall + hideSplitter: !window.callsIsOpened && middlePane.sourceComponent == incall || middlePane.sourceComponent == waitingRoom // ------------------------------------------------------------------------- // Calls list. @@ -235,7 +237,11 @@ Window { id: waitingRoom WaitingRoom{ conferenceInfoModel: window.conferenceInfoModel - onCancel: endOfProcess(0) + onCancel: { + endOfProcess(0) + window.conferenceInfoModel = null + calls.refreshLastCall() + } enabled: window.visible callModel: window.call } @@ -260,6 +266,8 @@ Window { if( sourceComponent == waitingRoom) mainPaned.close() rightPaned.childAItem.update() + if(!sourceComponent && calls.count == 0) + window.close() }// Force update when loading a new Content. It's just to be sure active: window.call || window.conferenceInfoModel } diff --git a/linphone-app/ui/views/App/Calls/Incall.qml b/linphone-app/ui/views/App/Calls/Incall.qml index ffc761780..f0f85c8f7 100644 --- a/linphone-app/ui/views/App/Calls/Incall.qml +++ b/linphone-app/ui/views/App/Calls/Incall.qml @@ -77,6 +77,7 @@ Rectangle { color: IncallStyle.pauseArea.title.color } Text{ + Layout.topMargin: 10 Layout.alignment: Qt.AlignCenter //: 'Click on play button to join it back.' : Explain what to do when being in pause in conference. text: qsTr('incallPauseHint') @@ -86,7 +87,7 @@ Rectangle { } Item{ Layout.fillWidth: true - Layout.preferredHeight: 140 + Layout.fillHeight: true } } } diff --git a/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml b/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml index c68b2976f..a01bbfdb8 100644 --- a/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml +++ b/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml @@ -27,15 +27,24 @@ Item { property bool cameraEnabled: true property alias showMe : allDevices.showMe property int participantCount: callModel.isConference ? allDevices.count : 2 + onParticipantCountChanged: {console.log("Conf count: " +participantCount);allDevices.updateCurrentDevice()} property ParticipantDeviceProxyModel participantDevices : ParticipantDeviceProxyModel { id: allDevices callModel: mainItem.callModel showMe: true + function updateShowMe(){ + showMe = cameraEnabled && !isPausedByUser + } onParticipantSpeaking: updateCurrentDevice() + // Do it on changed to ignore hard bindings (that can be override) property bool cameraEnabled: callModel && callModel.cameraEnabled - onCameraEnabledChanged: showMe = cameraEnabled // Do it on changed to ignore hard bindings (that can be override) + onCameraEnabledChanged:updateShowMe() + property bool isPausedByUser: callModel && callModel.pausedByUser + onIsPausedByUserChanged: updateShowMe() + //----- + onConferenceCreated: cameraView.resetCamera() function updateCurrentDevice(){ var device = getLastActiveSpeaking() @@ -81,7 +90,7 @@ Item { width: 16 * cellHeight / 9 model: mainItem.callModel.isConference ? mainItem.participantDevices - : mainItem.callModel.videoEnabled + : mainItem.callModel.videoEnabled && !callModel.pausedByUser ? [{videoEnabled:true, isPreview:true}] : [] onModelChanged: console.log( mainItem.callModel.isConference+"/"+mainItem.callModel.videoEnabled + "/" +mainItem.callModel.cameraEnabled + " / " +count) diff --git a/linphone-app/ui/views/App/Calls/IncallFullscreen.qml b/linphone-app/ui/views/App/Calls/IncallFullscreen.qml index a82d1827e..982dcdcc3 100644 --- a/linphone-app/ui/views/App/Calls/IncallFullscreen.qml +++ b/linphone-app/ui/views/App/Calls/IncallFullscreen.qml @@ -115,6 +115,7 @@ Window { color: IncallStyle.pauseArea.title.color } Text{ + Layout.topMargin: 10 Layout.alignment: Qt.AlignCenter //: 'Click on play button to join it back.' : Explain what to do when being in pause in conference. text: qsTr('incallPauseHint') @@ -124,7 +125,7 @@ Window { } Item{ Layout.fillWidth: true - Layout.preferredHeight: 140 + Layout.fillHeight: true } } } diff --git a/linphone-app/ui/views/App/Calls/WaitingRoom.qml b/linphone-app/ui/views/App/Calls/WaitingRoom.qml index f69a1a57f..7cb1483e2 100644 --- a/linphone-app/ui/views/App/Calls/WaitingRoom.qml +++ b/linphone-app/ui/views/App/Calls/WaitingRoom.qml @@ -46,7 +46,7 @@ Rectangle { anchors.fill: parent ColumnLayout{ Layout.alignment: Qt.AlignCenter - Layout.bottomMargin: (mainItem.conferenceInfoModel && mainItem.callModel ? 10 : 40) + Layout.bottomMargin: (mainItem.conferenceInfoModel && mainItem.callModel ? 10 : 30) spacing: 10 BusyIndicator { Layout.alignment: Qt.AlignCenter @@ -95,7 +95,7 @@ Rectangle { } Text{ Layout.alignment: Qt.AlignCenter - Layout.topMargin: mainItem.callModel ? 0 : 50 + Layout.topMargin: mainItem.callModel ? 0 : 40 text: mainItem.conferenceInfoModel ? mainItem.conferenceInfoModel.subject : (mainItem._sipAddressObserver ? UtilsCpp.getDisplayName(mainItem._sipAddressObserver.peerAddress) : '') color: WaitingRoomStyle.title.color