parent
260f10a83e
commit
d8b00bef02
|
@ -318,6 +318,7 @@ Item {
|
|||
|
||||
ChatTextView {
|
||||
id: chatText
|
||||
message: root.message
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: chatBox.chatVerticalPadding
|
||||
anchors.left: parent.left
|
||||
|
|
|
@ -11,6 +11,7 @@ import StatusQ.Core.Utils 0.1 as StatusQUtils
|
|||
Item {
|
||||
id: root
|
||||
|
||||
property string message: ""
|
||||
property var store
|
||||
property bool longChatText: true
|
||||
property bool veryLongChatText: globalUtils.plainText(message).length > Constants.limitLongChatTextCompactMode
|
||||
|
|
|
@ -64,6 +64,8 @@ Item {
|
|||
property bool editModeOn: false
|
||||
property string linkUrls: ""
|
||||
|
||||
property string message: ""
|
||||
|
||||
property var transactionParams
|
||||
|
||||
signal openStickerPackPopup(string stickerPackId)
|
||||
|
@ -513,6 +515,7 @@ Item {
|
|||
readonly property int leftPadding: chatImage.anchors.leftMargin + chatImage.width + chatHorizontalPadding
|
||||
visible: isText || isEmoji || isImage
|
||||
|
||||
message: Utils.removeGifUrls(root.message)
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: isEmoji ? 2 : 0
|
||||
anchors.left: parent.left
|
||||
|
|
|
@ -334,6 +334,7 @@ Column {
|
|||
CompactMessageView {
|
||||
container: root
|
||||
store: root.store
|
||||
message: root.message
|
||||
messageStore: root.messageStore
|
||||
usersStore: root.usersStore
|
||||
contactsStore: root.contactsStore
|
||||
|
|
|
@ -542,6 +542,10 @@ QtObject {
|
|||
return Constants.acceptedImageExtensions.some(ext => url.toLowerCase().includes(ext))
|
||||
}
|
||||
|
||||
function removeGifUrls(message) {
|
||||
return message.replace(/(?:https?|ftp):\/\/[\n\S]*(\.gif)+/gm, '');
|
||||
}
|
||||
|
||||
function hasDragNDropImageExtension(url) {
|
||||
return Constants.acceptedDragNDropImageExtensions.some(ext => url.toLowerCase().includes(ext))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue