aboutsummaryrefslogtreecommitdiff
path: root/qml
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>2021-02-15 16:57:45 +0300
committerlink2xt <link2xt@testrun.org>2021-02-15 16:57:45 +0300
commit7302bd5e2ed129b4c73e179df4d9909191d6df3d (patch)
treefcaacc9c687a79846e2348fa6615c2a8535f76d9 /qml
parent451a02b0350fe9931a1dfe8b674e6d0f9eb0333c (diff)
downloadkdeltachat-7302bd5e2ed129b4c73e179df4d9909191d6df3d.tar.gz
kdeltachat-7302bd5e2ed129b4c73e179df4d9909191d6df3d.zip
Use dc_msg_get_override_sender_name()
Diffstat (limited to 'qml')
-rw-r--r--qml/Message.qml9
1 files changed, 7 insertions, 2 deletions
diff --git a/qml/Message.qml b/qml/Message.qml
index 9170676..ae10dcd 100644
--- a/qml/Message.qml
+++ b/qml/Message.qml
@@ -16,6 +16,11 @@ RowLayout {
width: ListView.view.width
layoutDirection: message.fromId == 1 ? Qt.RightToLeft : Qt.LeftToRight
+ readonly property string overrideName: message.getOverrideSenderName()
+ readonly property string displayName: overrideName != "" ? ("~" + overrideName)
+ : messageObject.message.fromId > 0 ? messageObject.from.displayName
+ : ""
+
Rectangle {
Layout.preferredWidth: messageContents.width
Layout.preferredHeight: messageContents.height
@@ -34,7 +39,7 @@ RowLayout {
Label {
font.bold: true
color: messageObject.message.fromId > 0 ? messageObject.from.color : "black"
- text: messageObject.message.fromId > 0 ? messageObject.from.displayName : ""
+ text: messageObject.displayName
textFormat: Text.PlainText
}
}
@@ -46,7 +51,7 @@ RowLayout {
Label {
font.bold: true
color: messageObject.message.fromId > 0 ? messageObject.from.color : "black"
- text: messageObject.message.fromId > 0 ? messageObject.from.displayName : ""
+ text: messageObject.displayName
textFormat: Text.PlainText
}
}