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) { ...@@ -81,15 +81,11 @@ function handleCallTransferAsked (call) {
}) })
} }
function handleDetachedVirtualWindow () {
handleCountChanged(calls.count)
}
function windowMustBeClosed () { function windowMustBeClosed () {
return calls.count === 0 && !window.virtualWindowVisible return Linphone.CallsListModel.rowCount() === 0 && !window.virtualWindowVisible
} }
function handleCountChanged () { function tryToCloseWindow () {
if (windowMustBeClosed()) { if (windowMustBeClosed()) {
// Workaround, it's necessary to use a timeout because at last call termination // Workaround, it's necessary to use a timeout because at last call termination
// a segfault is emit in `QOpenGLContext::functions() const ()`. // a segfault is emit in `QOpenGLContext::functions() const ()`.
......
...@@ -55,7 +55,7 @@ Window { ...@@ -55,7 +55,7 @@ Window {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
onClosing: Logic.handleClosing(close) onClosing: Logic.handleClosing(close)
onDetachedVirtualWindow: Logic.handleDetachedVirtualWindow() onDetachedVirtualWindow: Logic.tryToCloseWindow()
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
...@@ -124,8 +124,6 @@ Window { ...@@ -124,8 +124,6 @@ Window {
conferenceModel: ConferenceModel {} conferenceModel: ConferenceModel {}
model: CallsListProxyModel {} model: CallsListProxyModel {}
onCountChanged: Logic.handleCountChanged(count)
} }
} }
} }
...@@ -212,10 +210,12 @@ Window { ...@@ -212,10 +210,12 @@ Window {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Handle transfer. // Handle transfer.
// Handle count changed. Not on proxy model!!!
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
Connections { Connections {
target: CallsListModel target: CallsListModel
onCallTransferAsked: Logic.handleCallTransferAsked(callModel) 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