diff --git a/src/app/commoncomponents/SBSMessageBase.qml b/src/app/commoncomponents/SBSMessageBase.qml index e3ae6e1c0ebc39449bd3a50d46b71e14da761acb..39e059c82f7886499993224a7d91e318f099186c 100644 --- a/src/app/commoncomponents/SBSMessageBase.qml +++ b/src/app/commoncomponents/SBSMessageBase.qml @@ -54,7 +54,6 @@ Control { property bool textHovered: false property alias replyAnimation: selectAnimation width: listView.width - height: mainColumnLayout.implicitHeight property real textContentWidth property real textContentHeight diff --git a/src/app/commoncomponents/TextMessageDelegate.qml b/src/app/commoncomponents/TextMessageDelegate.qml index 2584a31b24a7e576965bb600645ea313bbccfdc5..27f78bf576644a3b8dabac2b34df5759e9a5a445 100644 --- a/src/app/commoncomponents/TextMessageDelegate.qml +++ b/src/app/commoncomponents/TextMessageDelegate.qml @@ -33,7 +33,7 @@ SBSMessageBase { property string colorUrl: UtilsAdapter.luma(bubble.color) ? JamiTheme.chatviewLinkColorLight : JamiTheme.chatviewLinkColorDark property string colorText: UtilsAdapter.luma(bubble.color) ? JamiTheme.chatviewTextColorLight : JamiTheme.chatviewTextColorDark - bigMsg: (textEditId.lineCount > 1) || extraContent.active + Connections { target: bubble @@ -46,6 +46,7 @@ SBSMessageBase { } } + isOutgoing: Author === CurrentAccount.uri author: Author readers: Readers @@ -54,9 +55,11 @@ SBSMessageBase { formattedDay: MessagesAdapter.getFormattedDay(Timestamp) extraHeight: extraContent.active && !isRemoteImage ? msgRadius : -isRemoteImage textHovered: textHoverhandler.hovered - textContentWidth: textEditId.width + (bigMsg ? 0 : root.timeWidth + root.editedWidth) + textContentWidth: textEditId.width textContentHeight: textEditId.height + bigMsg: textContentWidth >= (2 / 3) * root.maxMsgWidth || extraContent.active + innerContent.children: [ TextEdit { id: textEditId @@ -87,11 +90,9 @@ SBSMessageBase { else if (isEmojiOnly) Math.min((2 / 3) * root.maxMsgWidth, implicitWidth, innerContent.width - senderMargin - (innerContent.width - senderMargin) % (JamiTheme.chatviewEmojiSize + 2)); else - Math.max(Math.min((2 / 3) * root.maxMsgWidth - ( bigMsg ? 0 : root.timeWidth + root.editedWidth), implicitWidth + 5, innerContent.width - senderMargin + 5 ), bigMsg ? root.timeWidth + root.editedWidth + 14: 0) ; + Math.min((2 / 3) * root.maxMsgWidth, implicitWidth + 5 + root.timeWidth + root.editedWidth, innerContent.width - senderMargin + 5 + root.timeWidth + root.editedWidth); } - anchors.rightMargin: bigMsg ? 0 : root.timeWidth + root.editedWidth - wrapMode: Label.WrapAtWordBoundaryOrAnywhere selectByMouse: true font.pointSize: isEmojiOnly ? JamiTheme.chatviewEmojiSize : (ParsedBody === "" ? JamiTheme.smallFontSize : JamiTheme.mediumFontSize)