diff --git a/linphone-desktop/ui/modules/Linphone/Calls/Calls.js b/linphone-desktop/ui/modules/Linphone/Calls/Calls.js index 693df0fdb..551a850c6 100644 --- a/linphone-desktop/ui/modules/Linphone/Calls/Calls.js +++ b/linphone-desktop/ui/modules/Linphone/Calls/Calls.js @@ -139,7 +139,8 @@ function handleRowsInserted (_, first, last) { } } - if (index === 0 && model.rowsCount() === 1) { + // First received call. + if (first === 0 && model.rowCount() === 1) { resetSelectedCall() } } diff --git a/linphone-desktop/ui/modules/Linphone/Calls/Calls.qml b/linphone-desktop/ui/modules/Linphone/Calls/Calls.qml index 279035356..65e0c5c3c 100644 --- a/linphone-desktop/ui/modules/Linphone/Calls/Calls.qml +++ b/linphone-desktop/ui/modules/Linphone/Calls/Calls.qml @@ -13,7 +13,7 @@ ListView { // --------------------------------------------------------------------------- - readonly property var selectedCall: _selectedCall + readonly property var selectedCall: calls._selectedCall property var _selectedCall @@ -30,7 +30,7 @@ ListView { Connections { target: model - onCallRunning: Logic.handleCallRunning(index, call) + onCallRunning: Logic.handleCallRunning(index, callModel) onRowsAboutToBeRemoved: Logic.handleRowsAboutToBeRemoved(parent, first, last) onRowsInserted: Logic.handleRowsInserted(parent, first, last) }