mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
While pausing in call, pause view is in center and hide preview in active speaking.
Hide calls view in waiting room. Avoid closing calls window if we are in the waiting room. After cancelling the join of a conference, come back to the last call view (or the top of the list if last is not connected).
This commit is contained in:
parent
ddc4143885
commit
b648fc03be
8 changed files with 57 additions and 16 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 () {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue