aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_summary
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2018-10-23 22:33:19 +0200
committerfiaxh <git@mx.ax.lt>2018-10-23 22:57:37 +0200
commit006e25aab8c64a38150df4a97a68755dd21df521 (patch)
tree69493d075b633ec609d51f7e3f73325310696078 /main/src/ui/conversation_summary
parent6b7ef800f54e781a618425236ba8d4ed2f2fef9c (diff)
downloaddino-006e25aab8c64a38150df4a97a68755dd21df521.tar.gz
dino-006e25aab8c64a38150df4a97a68755dd21df521.zip
Display bold/italic/monospace message formating, improve message-to-markup parsing
fixes #433 fixes #442
Diffstat (limited to 'main/src/ui/conversation_summary')
-rw-r--r--main/src/ui/conversation_summary/content_item_widget_factory.vala7
1 files changed, 3 insertions, 4 deletions
diff --git a/main/src/ui/conversation_summary/content_item_widget_factory.vala b/main/src/ui/conversation_summary/content_item_widget_factory.vala
index 9e1edcb0..26b66664 100644
--- a/main/src/ui/conversation_summary/content_item_widget_factory.vala
+++ b/main/src/ui/conversation_summary/content_item_widget_factory.vala
@@ -60,10 +60,11 @@ public class MessageItemWidgetGenerator : WidgetGenerator, Object {
if (message_item.message.body.has_prefix("/me")) {
markup_text = markup_text.substring(3);
}
- markup_text = Markup.escape_text(markup_text);
if (conversation.type_ == Conversation.Type.GROUPCHAT) {
- markup_text = Util.make_word_bold_markup(markup_text, conversation.nickname);
+ markup_text = Util.parse_add_markup(markup_text, conversation.nickname, true, true);
+ } else {
+ markup_text = Util.parse_add_markup(markup_text, null, true, true);
}
if (message_item.message.body.has_prefix("/me")) {
@@ -73,8 +74,6 @@ public class MessageItemWidgetGenerator : WidgetGenerator, Object {
label.style_updated.connect(() => update_me_style(stream_interactor, message.real_jid ?? message.from, display_name, conversation.account, label, markup_text));
}
- markup_text = Util.make_link_markup(markup_text);
-
label.label = markup_text;
return label;
}