From 3aff1795c82de975ab4c8fc1f510484bf519d845 Mon Sep 17 00:00:00 2001 From: James Graham Date: Sun, 5 Nov 2023 19:57:15 +0000 Subject: [PATCH] Accounts Popup Close on Hide Make sure that the accounts popup is closed when the UserInfo component is hidden --- src/qml/UserInfo.qml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/qml/UserInfo.qml b/src/qml/UserInfo.qml index a1f659845..4b18e6772 100644 --- a/src/qml/UserInfo.qml +++ b/src/qml/UserInfo.qml @@ -27,6 +27,13 @@ RowLayout { Layout.bottomMargin: Kirigami.Units.smallSpacing Layout.minimumHeight: bottomEdge ? Kirigami.Units.gridUnit * 2 - 2 : -1 // HACK: -2 here is to ensure the ChatBox and the UserInfo have the same height + onVisibleChanged: { + if (!visible) { + accountsPopup.close(); + switchUserButton.checked = false; + } + } + QQC2.AbstractButton { id: accountButton