fix(ui): Chat commands popup hide on second click

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

View File

@ -11,6 +11,7 @@ Popup {
height: buttonRow.height height: buttonRow.height
padding: 0 padding: 0
margins: 0 margins: 0
closePolicy: Popup.CloseOnReleaseOutsideParent | Popup.CloseOnEscape
signal sendTransactionCommandButtonClicked() signal sendTransactionCommandButtonClicked()
signal receiveTransactionCommandButtonClicked() signal receiveTransactionCommandButtonClicked()

View File

@ -643,6 +643,9 @@ Rectangle {
onClosed: { onClosed: {
chatCommandsBtn.highlighted = false chatCommandsBtn.highlighted = false
} }
onOpened: {
chatCommandsBtn.highlighted = true
}
} }
StatusGifPopup { StatusGifPopup {
@ -705,8 +708,9 @@ Rectangle {
visible: !isEdit && control.chatType === Constants.chatTypeOneToOne && !control.isStatusUpdateInput visible: !isEdit && control.chatType === Constants.chatTypeOneToOne && !control.isStatusUpdateInput
enabled: !control.isContactBlocked enabled: !control.isContactBlocked
onClicked: { onClicked: {
highlighted = true chatCommandsPopup.opened ?
chatCommandsPopup.open() chatCommandsPopup.close() :
chatCommandsPopup.open()
} }
} }