fix(@desktop/chat): Show text for messages with gif image

Close #5434
This commit is contained in:
mishkarogachev 2022-05-11 13:16:52 +03:00 committed by Iuri Matias
parent 06f7f1668d
commit 7b45ce60a7
2 changed files with 3 additions and 10 deletions

View File

@ -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: {

View File

@ -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