Commit e09911d8 authored by Ronan Abhamon's avatar Ronan Abhamon

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

parent 4572a3b9
......@@ -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 ()`.
......
......@@ -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()
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment