From d59f1ddde1dab531d01adbf060ba7f2affaf1009 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Fri, 17 Mar 2017 14:51:19 +0100 Subject: [PATCH] feat(ui/views/App/Calls/Incall): hide fullscreen window when call is ended --- linphone-desktop/ui/views/App/Calls/Incall.js | 11 ++++++++++- linphone-desktop/ui/views/App/Calls/Incall.qml | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/linphone-desktop/ui/views/App/Calls/Incall.js b/linphone-desktop/ui/views/App/Calls/Incall.js index f7f6eaa3d..24ef9f50e 100644 --- a/linphone-desktop/ui/views/App/Calls/Incall.js +++ b/linphone-desktop/ui/views/App/Calls/Incall.js @@ -16,6 +16,15 @@ function computeAvatarSize (maxSize) { return size < width ? size : width } +function handleStatusChanged (status) { + if (status === Linphone.CallModel.CallStatusEnded) { + var fullscreen = incall._fullscreen + if (fullscreen) { + fullscreen.close() + } + } +} + function handleVideoRequested () { var call = incall.call var dialog @@ -58,7 +67,7 @@ function handleVideoRequested () { }) } -function showFullScreen () { +function showFullscreen () { if (incall._fullscreen) { return } diff --git a/linphone-desktop/ui/views/App/Calls/Incall.qml b/linphone-desktop/ui/views/App/Calls/Incall.qml index 898e9bb54..f1fd2edbb 100644 --- a/linphone-desktop/ui/views/App/Calls/Incall.qml +++ b/linphone-desktop/ui/views/App/Calls/Incall.qml @@ -37,6 +37,7 @@ Rectangle { Connections { target: call + onStatusChanged: Logic.handleStatusChanged (status) onVideoRequested: Logic.handleVideoRequested() }