Skip to content
Snippets Groups Projects
Unverified Commit ddf749d3 authored by tastytea's avatar tastytea
Browse files

Remove extra … from reaction text if it is already there

elidedText should have … in it if the text doesn't fit, but it seems
that it is omitted if the emoji font doesn't have it. :rolling_eyes:
See <https://github.com/Nheko-Reborn/nheko/pull/982>.
parent b82b7247
No related branches found
No related tags found
No related merge requests found
Pipeline #2793 passed
......@@ -66,7 +66,15 @@ Flow {
id: reactionText
anchors.baseline: reactionCounter.baseline
text: textMetrics.elidedText + (textMetrics.elidedText == modelData.displayKey ? "" : "")
text: {
// When an emoji font is selected that doesn't have …, it is dropped from elidedText. So we add it back.
if (textMetrics.elidedText !== modelData.displayKey) {
if (!textMetrics.elidedText.endsWith("")) {
return textMetrics.elidedText + "";
}
}
return textMetrics.elidedText;
}
font.family: Settings.emojiFont
color: reaction.hovered ? Nheko.colors.highlight : Nheko.colors.text
maximumLineCount: 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment