From 9af1d15f8e56abd190f7dbf6e645021cbde2107f Mon Sep 17 00:00:00 2001 From: PavelS Date: Thu, 28 Jul 2022 12:43:18 +0300 Subject: [PATCH] fix(@desktop/onboarding): update handler and naming - add logic clarification comment Closes:#6518 --- ui/app/AppLayouts/Onboarding/views/LoginView.qml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ui/app/AppLayouts/Onboarding/views/LoginView.qml b/ui/app/AppLayouts/Onboarding/views/LoginView.qml index be9839f313..ea250cd40b 100644 --- a/ui/app/AppLayouts/Onboarding/views/LoginView.qml +++ b/ui/app/AppLayouts/Onboarding/views/LoginView.qml @@ -159,20 +159,22 @@ Item { } MouseArea { - property bool accountPopupOpened: false + property bool accountPopupWasOpened: false anchors.fill: parent anchors.margins: -10 cursorShape: Qt.PointingHandCursor hoverEnabled: true onEntered: { - accountPopupOpened = accountsPopup.opened + // cache opened state, because it is always false in onClicked + // because of CloseOnPressOutsideParent policy of accountsPopup + accountPopupWasOpened = accountsPopup.opened } - onPressed: { - if (!accountPopupOpened) { + onClicked: { + if (!accountPopupWasOpened) { changeAccountBtn.clicked(mouse) } - accountPopupOpened = accountsPopup.opened + accountPopupWasOpened = accountsPopup.opened } }