fix(ui): User presence popup hide on second click

Partially fixes #3558.
This commit is contained in:
Eric Mastro 2021-09-27 20:31:17 +10:00 committed by Iuri Matias
parent 1ee3bba598
commit b8d4192c02
2 changed files with 7 additions and 2 deletions

View File

@ -353,6 +353,7 @@ Item {
navBarProfileButton: StatusNavBarTabButton {
id: profileButton
property bool opened: false
icon.source: profileModel.profile.thumbnailImage || ""
badge.visible: true
badge.anchors.rightMargin: 4
@ -374,7 +375,11 @@ Item {
}*/
}
badge.border.width: 3
onClicked: userStatusContextMenu.open()
onClicked: {
userStatusContextMenu.opened ?
userStatusContextMenu.close() :
userStatusContextMenu.open()
}
UserStatusContextMenu {
id: userStatusContextMenu

View File

@ -10,7 +10,7 @@ import "./"
PopupMenu {
id: root
width: profileHeader.width
closePolicy: Popup.CloseOnPressOutside | Popup.CloseOnEscape
closePolicy: Popup.CloseOnReleaseOutsideParent | Popup.CloseOnEscape
Item {
id: profileHeader