Don't show replied-to event as edited for edited replies

This commit is contained in:
Tobias Fella
2022-11-27 02:24:19 +01:00
parent bad15cadd1
commit 252108c652
2 changed files with 3 additions and 1 deletions

View File

@@ -96,6 +96,7 @@ Item {
RichLabel {
textMessage: reply.display
textFormat: Text.RichText
isReplyLabel: true
}
}
Component {

View File

@@ -15,6 +15,7 @@ TextEdit {
readonly property var hasSpoiler: /data-mx-spoiler/g
property bool isEmote: false
property bool isReplyLabel: false
readonly property var linkRegex: /(href=["'])?(\b(https?):\/\/[^\s\<\>\"\'\\]+)/g
property string textMessage: model.display.includes("http")
@@ -74,7 +75,7 @@ a{
background: " + Kirigami.Theme.textColor + ";
}
" : "") + "
</style>" + textMessage + (isEdited ? (" <span style=\"color: " + Kirigami.Theme.disabledTextColor + "\">" + "<span style='font-size: " + Kirigami.Theme.defaultFont.pixelSize +"px'>" + i18n(" (edited)") + "</span>") : "")
</style>" + textMessage + (isEdited && !contentLabel.isReplyLabel ? (" <span style=\"color: " + Kirigami.Theme.disabledTextColor + "\">" + "<span style='font-size: " + Kirigami.Theme.defaultFont.pixelSize +"px'>" + i18n(" (edited)") + "</span>") : "")
color: Kirigami.Theme.textColor
selectedTextColor: Kirigami.Theme.highlightedTextColor