From b651be3c3098d8f3ea1ba5fa29bda6add1ea4067 Mon Sep 17 00:00:00 2001 From: miruka Date: Fri, 30 Aug 2019 12:07:50 -0400 Subject: [PATCH] Support greentext in RoomDelegate subtitle --- src/qml/SidePane/RoomDelegate.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/qml/SidePane/RoomDelegate.qml b/src/qml/SidePane/RoomDelegate.qml index fa96fab7..5f5ddf9b 100644 --- a/src/qml/SidePane/RoomDelegate.qml +++ b/src/qml/SidePane/RoomDelegate.qml @@ -75,9 +75,14 @@ HTileDelegate { return Utils.processedEventText(ev) } - return Utils.coloredNameHtml( + let text = Utils.coloredNameHtml( ev.sender_name, ev.sender_id ) + ": " + ev.inline_content + + return text.replace( + /< *span +class=['"]?greentext['"]? *>(.+)<\/ *span *>/, + '$1', + ) } contextMenu: HMenu {