Commit 6826218d authored by Ronan Abhamon's avatar Ronan Abhamon

fix(ui/views/App/Calls/Incall): prevent many clicks on statistics button

parent e9071f4c
...@@ -16,6 +16,13 @@ function computeAvatarSize (maxSize) { ...@@ -16,6 +16,13 @@ function computeAvatarSize (maxSize) {
return size < width ? size : width return size < width ? size : width
} }
function handleCallStatisticsClosed () {
// Prevent many clicks on call statistics button.
Utils.setTimeout(callQuality, 500, function () {
callQuality.enabled = true
})
}
function handleStatusChanged (status) { function handleStatusChanged (status) {
if (status === Linphone.CallModel.CallStatusEnded) { if (status === Linphone.CallModel.CallStatusEnded) {
var fullscreen = incall._fullscreen var fullscreen = incall._fullscreen
...@@ -72,6 +79,11 @@ function makeReadableSecuredString (securedString) { ...@@ -72,6 +79,11 @@ function makeReadableSecuredString (securedString) {
return qsTr('securedStringFormat').replace('%1', securedString) return qsTr('securedStringFormat').replace('%1', securedString)
} }
function openCallStatistics () {
callQuality.enabled = false
callStatistics.open()
}
function showFullscreen () { function showFullscreen () {
if (incall._fullscreen) { if (incall._fullscreen) {
return return
......
...@@ -93,7 +93,7 @@ Rectangle { ...@@ -93,7 +93,7 @@ Rectangle {
icon: 'call_quality_0' icon: 'call_quality_0'
useStates: false useStates: false
onClicked: callStatistics.open() onClicked: Logic.openCallStatistics()
// See: http://www.linphone.org/docs/liblinphone/group__call__misc.html#ga62c7d3d08531b0cc634b797e273a0a73 // See: http://www.linphone.org/docs/liblinphone/group__call__misc.html#ga62c7d3d08531b0cc634b797e273a0a73
Timer { Timer {
...@@ -113,6 +113,8 @@ Rectangle { ...@@ -113,6 +113,8 @@ Rectangle {
relativeTo: callQuality relativeTo: callQuality
relativeY: CallStyle.header.stats.relativeY relativeY: CallStyle.header.stats.relativeY
onClosed: Logic.handleCallStatisticsClosed()
} }
} }
......
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