From f903c635a790db966bf426d644050b24cab748c7 Mon Sep 17 00:00:00 2001 From: lcoursodon Date: Thu, 6 Jul 2023 10:43:35 -0400 Subject: [PATCH] EmojiPicker: close popup when repress the button Fixing issues where clicking a second time on the emoji button open a second popup instead of closing the first one GitLab: #1249 Change-Id: I76f0094c4024ae27f260e6aeba93522d3709feef --- src/app/mainview/components/ChatViewFooter.qml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/app/mainview/components/ChatViewFooter.qml b/src/app/mainview/components/ChatViewFooter.qml index c37ac3a99..f388fd6fd 100644 --- a/src/app/mainview/components/ChatViewFooter.qml +++ b/src/app/mainview/components/ChatViewFooter.qml @@ -170,7 +170,11 @@ Rectangle { sendButtonVisibility: text || dataTransferSendContainer.filesToSendCount onEmojiButtonClicked: { - openEmojiPicker(); + if (emojiPicker != null && emojiPicker.opened) { + emojiPicker.closeEmojiPicker(); + } else { + openEmojiPicker(); + } } onShowMapClicked: { @@ -222,9 +226,8 @@ Rectangle { if (keyEvent.key === Qt.Key_Escape) { if (recordBox != null && recordBox.opened) { recordBox.closeRecorder(); - } - else if (PositionManager.isMapActive(CurrentAccount.id)){ - PositionManager.setMapInactive(CurrentAccount.id) + } else if (PositionManager.isMapActive(CurrentAccount.id)) { + PositionManager.setMapInactive(CurrentAccount.id); } } }