From 7b45ce60a7cc55eee1e24867f907e44ba70aceb0 Mon Sep 17 00:00:00 2001 From: mishkarogachev Date: Wed, 11 May 2022 13:16:52 +0300 Subject: [PATCH] fix(@desktop/chat): Show text for messages with gif image Close #5434 --- ui/imports/shared/status/StatusChatInput.qml | 4 ++-- ui/imports/shared/views/chat/CompactMessageView.qml | 9 +-------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/ui/imports/shared/status/StatusChatInput.qml b/ui/imports/shared/status/StatusChatInput.qml index 1544be64e9..7a3215a6e0 100644 --- a/ui/imports/shared/status/StatusChatInput.qml +++ b/ui/imports/shared/status/StatusChatInput.qml @@ -738,11 +738,11 @@ Rectangle { x: parent.width - width - Style.current.halfPadding y: -height gifSelected: function (event, url) { - messageInputField.text = url + messageInputField.text += "\n" + url control.sendMessage(event) gifBtn.highlighted = false messageInputField.forceActiveFocus() - if(control.closeGifPopupAfterSelection) + if (control.closeGifPopupAfterSelection) gifPopup.close() } onClosed: { diff --git a/ui/imports/shared/views/chat/CompactMessageView.qml b/ui/imports/shared/views/chat/CompactMessageView.qml index 68b7056668..9c4986447d 100644 --- a/ui/imports/shared/views/chat/CompactMessageView.qml +++ b/ui/imports/shared/views/chat/CompactMessageView.qml @@ -501,14 +501,7 @@ Item { ChatTextView { id: chatText readonly property int leftPadding: chatImage.anchors.leftMargin + chatImage.width + chatHorizontalPadding - visible: { - const urls = linkUrls.split(" ") - if (urls.length === 1 && Utils.hasImageExtension(urls[0]) && localAccountSensitiveSettings.displayChatImages) { - return false - } - - return isText || isEmoji - } + visible: isText || isEmoji || isImage anchors.top: parent.top anchors.topMargin: isEmoji ? 2 : 0