From 006e25aab8c64a38150df4a97a68755dd21df521 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Tue, 23 Oct 2018 22:33:19 +0200 Subject: Display bold/italic/monospace message formating, improve message-to-markup parsing fixes #433 fixes #442 --- main/src/ui/conversation_summary/content_item_widget_factory.vala | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'main/src/ui/conversation_summary') 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; } -- cgit v1.2.3-70-g09d2