diff --git a/images/icon-s-eye.svg b/images/icon-s-eye.svg new file mode 100644 index 0000000..822f025 --- /dev/null +++ b/images/icon-s-eye.svg @@ -0,0 +1,35 @@ + +image/svg+xml + + \ No newline at end of file diff --git a/qml/components/MessageListViewItem.qml b/qml/components/MessageListViewItem.qml index 1e81d59..f3c9155 100644 --- a/qml/components/MessageListViewItem.qml +++ b/qml/components/MessageListViewItem.qml @@ -475,6 +475,7 @@ ListItem { color: messageListItem.isOwnMessage ? Theme.secondaryHighlightColor : Theme.secondaryColor horizontalAlignment: messageListItem.textAlign text: getMessageStatusText(myMessage, index, chatView.lastReadSentIndex, messageDateText.useElapsed) + rightPadding: interactionLoader.active ? interactionLoader.width : 0 MouseArea { anchors.fill: parent enabled: !messageListItem.precalculatedValues.pageIsSelecting @@ -483,6 +484,34 @@ ListItem { messageDateText.text = getMessageStatusText(myMessage, index, chatView.lastReadSentIndex, messageDateText.useElapsed); } } + + Loader { + id: interactionLoader + height: parent.height + anchors.right: parent.right + asynchronous: true + active: chatPage.isChannel && myMessage.interaction_info && myMessage.interaction_info.view_count + sourceComponent: Component { + Label { + text: Functions.getShortenedCount(myMessage.interaction_info.view_count) + leftPadding: Theme.iconSizeSmall + font.pixelSize: Theme.fontSizeTiny + color: Theme.secondaryColor + Icon { + anchors.verticalCenter: parent.verticalCenter + width: Theme.iconSizeExtraSmall + height: Theme.iconSizeExtraSmall + opacity: 0.6 + source: "../../images/icon-s-eye.svg" + sourceSize { + width: Theme.iconSizeExtraSmall + height: Theme.iconSizeExtraSmall + } + } + } + } + + } } } diff --git a/qml/pages/ChatPage.qml b/qml/pages/ChatPage.qml index 0e59b1b..b297805 100644 --- a/qml/pages/ChatPage.qml +++ b/qml/pages/ChatPage.qml @@ -963,7 +963,7 @@ Page { readonly property int paddingMediumDouble: 2 * Theme.paddingMedium readonly property int entryWidth: chatView.width - pageMarginDouble readonly property int textItemWidth: entryWidth - profileThumbnailDimensions - Theme.paddingSmall - readonly property int backgroundWidth: textItemWidth - pageMarginDouble + readonly property int backgroundWidth: page.isChannel ? textItemWidth : textItemWidth - pageMarginDouble readonly property int backgroundRadius: textItemWidth/50 readonly property int textColumnWidth: backgroundWidth - Theme.horizontalPageMargin readonly property int messageInReplyToHeight: Theme.fontSizeExtraSmall * 2.571428571 + Theme.paddingSmall;