Fix read counter display on EventImage
- Fix extra spacing on the right of the date when there's no read counter to show - Fix read counter not being colored
This commit is contained in:
parent
ee1091b4dc
commit
e6499d8fba
|
@ -37,16 +37,16 @@ HRowLayout {
|
||||||
readonly property string timeText: utils.formatTime(model.date, false)
|
readonly property string timeText: utils.formatTime(model.date, false)
|
||||||
|
|
||||||
readonly property string stateText:
|
readonly property string stateText:
|
||||||
`<font size=${theme.fontSize.small}px color=` + (
|
`<font size=${theme.fontSize.small}px><font ` + (
|
||||||
model.is_local_echo ?
|
model.is_local_echo ?
|
||||||
`${theme.chat.message.localEcho}> ⧗</font>` : // U+29D7
|
`color="${theme.chat.message.localEcho}"> ⧗` : // U+29D7
|
||||||
|
|
||||||
model.read_by_count ?
|
model.read_by_count ?
|
||||||
`${theme.chat.message.readCounter}> ⦿ ` +
|
`color="${theme.chat.message.readCounter}"> ⦿ ` +
|
||||||
model.read_by_count : // U+29BF
|
model.read_by_count : // U+29BF
|
||||||
|
|
||||||
""
|
">"
|
||||||
) + "</font>"
|
) + "</font></font>"
|
||||||
|
|
||||||
readonly property bool pureMedia: ! contentText && linksRepeater.count
|
readonly property bool pureMedia: ! contentText && linksRepeater.count
|
||||||
|
|
||||||
|
@ -318,7 +318,10 @@ HRowLayout {
|
||||||
mediaUrl: modelData
|
mediaUrl: modelData
|
||||||
showSender: pureMedia ? senderText : ""
|
showSender: pureMedia ? senderText : ""
|
||||||
showDate: pureMedia ? timeText : ""
|
showDate: pureMedia ? timeText : ""
|
||||||
showLocalEcho: pureMedia ? stateText : ""
|
showLocalEcho: pureMedia && (
|
||||||
|
singleMediaInfo.is_local_echo ||
|
||||||
|
singleMediaInfo.read_by_count
|
||||||
|
) ? stateText : ""
|
||||||
|
|
||||||
transform: Translate { x: xOffset }
|
transform: Translate { x: xOffset }
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,8 @@ HMxcImage {
|
||||||
EventImageTextBubble {
|
EventImageTextBubble {
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
text: [loader.showDate, loader.showLocalEcho].join(" ").trim()
|
text: loader.showDate + loader.showLocalEcho
|
||||||
|
|
||||||
textFormat: Text.StyledText
|
textFormat: Text.StyledText
|
||||||
opacity: hover.hovered ? 0 : 1
|
opacity: hover.hovered ? 0 : 1
|
||||||
visible: opacity > 0
|
visible: opacity > 0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user