From 5d0d8ec7a76b7ad45b505fc0061754c64fcd52c1 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Thu, 16 Jan 2025 10:39:07 +0100 Subject: [PATCH] Avoid to load details while animating contact stack view. --- Linphone/view/Page/Main/Call/CallPage.qml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Linphone/view/Page/Main/Call/CallPage.qml b/Linphone/view/Page/Main/Call/CallPage.qml index 3bcc54108..4b34f0c9e 100644 --- a/Linphone/view/Page/Main/Call/CallPage.qml +++ b/Linphone/view/Page/Main/Call/CallPage.qml @@ -101,12 +101,25 @@ AbstractMainPage { anchors.leftMargin: 45 * DefaultStyle.dp anchors.right: parent.right anchors.bottom: parent.bottom + + property var setFocusAtEnd + clip: true initialItem: historyListItem focus: true + onActiveFocusChanged: if(activeFocus){ currentItem.forceActiveFocus() } + + onBusyChanged: if( !busy && setFocusAtEnd) { + setFocusAtEnd.forceActiveFocus() + setFocusAtEnd = undefined + } + function doPop(setFocus){ + setFocusAtEnd = setFocus + listStackView.pop() + } } Item { @@ -457,8 +470,7 @@ AbstractMainPage { KeyNavigation.down: listStackView onClicked: { console.debug("[CallPage]User: return to call history") - listStackView.pop() - listStackView.forceActiveFocus() + listStackView.doPop(listStackView) } } Text { @@ -531,8 +543,7 @@ AbstractMainPage { KeyNavigation.right: groupCallButton KeyNavigation.left: groupCallButton onClicked: { - listStackView.pop() - titleLoader.item.forceActiveFocus() + listStackView.doPop(titleLoader.item) } } ColumnLayout {