fix(ui/views/App/Calls/CallsWindow): do not show closing virtual window in conference mode

This commit is contained in:
Ronan Abhamon 2017-06-07 14:56:48 +02:00
parent 4572a3b978
commit e09911d8fb
2 changed files with 5 additions and 9 deletions

View file

@ -81,15 +81,11 @@ function handleCallTransferAsked (call) {
})
}
function handleDetachedVirtualWindow () {
handleCountChanged(calls.count)
}
function windowMustBeClosed () {
return calls.count === 0 && !window.virtualWindowVisible
return Linphone.CallsListModel.rowCount() === 0 && !window.virtualWindowVisible
}
function handleCountChanged () {
function tryToCloseWindow () {
if (windowMustBeClosed()) {
// Workaround, it's necessary to use a timeout because at last call termination
// a segfault is emit in `QOpenGLContext::functions() const ()`.

View file

@ -55,7 +55,7 @@ Window {
// ---------------------------------------------------------------------------
onClosing: Logic.handleClosing(close)
onDetachedVirtualWindow: Logic.handleDetachedVirtualWindow()
onDetachedVirtualWindow: Logic.tryToCloseWindow()
// ---------------------------------------------------------------------------
@ -124,8 +124,6 @@ Window {
conferenceModel: ConferenceModel {}
model: CallsListProxyModel {}
onCountChanged: Logic.handleCountChanged(count)
}
}
}
@ -212,10 +210,12 @@ Window {
// ---------------------------------------------------------------------------
// Handle transfer.
// Handle count changed. Not on proxy model!!!
// ---------------------------------------------------------------------------
Connections {
target: CallsListModel
onCallTransferAsked: Logic.handleCallTransferAsked(callModel)
onRowsRemoved: Logic.tryToCloseWindow()
}
}