feat(@desktop/chat): Hide chat text when the link is only an image
fixes #3366
This commit is contained in:
parent
95a3b63adb
commit
6f2dab2e29
|
@ -11,7 +11,6 @@ Item {
|
|||
property alias textField: chatText
|
||||
|
||||
id: root
|
||||
visible: isText || isEmoji
|
||||
z: 51
|
||||
|
||||
implicitHeight: visible ? (showMoreLoader.active ? childrenRect.height - 10 : chatText.height) : 0
|
||||
|
|
|
@ -286,8 +286,17 @@ Item {
|
|||
visible: !isEdit
|
||||
|
||||
ChatText {
|
||||
readonly property int leftPadding: chatImage.anchors.leftMargin + chatImage.width + root.chatHorizontalPadding
|
||||
id: chatText
|
||||
readonly property int leftPadding: chatImage.anchors.leftMargin + chatImage.width + root.chatHorizontalPadding
|
||||
visible: {
|
||||
const urls = root.linkUrls.split(" ")
|
||||
if (urls.length === 1 && Utils.hasImageExtension(urls[0]) && appSettings.displayChatImages) {
|
||||
return false
|
||||
}
|
||||
|
||||
return isText || isEmoji
|
||||
}
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: isEmoji ? 2 : 0
|
||||
anchors.left: parent.left
|
||||
|
|
Loading…
Reference in New Issue