From bd7fde99af3df59c5ec96184b2649b4308250b24 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Tue, 10 Sep 2019 19:11:41 +0200 Subject: fixup Fix some warnings --- main/src/ui/unified_window_controller.vala | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'main/src/ui/unified_window_controller.vala') diff --git a/main/src/ui/unified_window_controller.vala b/main/src/ui/unified_window_controller.vala index 21725574..2fd8eb0d 100644 --- a/main/src/ui/unified_window_controller.vala +++ b/main/src/ui/unified_window_controller.vala @@ -153,19 +153,11 @@ public class UnifiedWindowController : Object { private void update_conversation_topic(string? subtitle = null) { if (subtitle != null) { - try { - conversation_topic = (/\s+/).replace_literal(subtitle, -1, 0, " "); - } catch (RegexError e) { - assert_not_reached(); - } + conversation_topic = Util.summarize_whitespaces_to_space(subtitle); } else if (conversation.type_ == Conversation.Type.GROUPCHAT) { string? subject = stream_interactor.get_module(MucManager.IDENTITY).get_groupchat_subject(conversation.counterpart, conversation.account); if (subject != null) { - try { - conversation_topic = (/\s+/).replace_literal(subject, -1, 0, " "); - } catch (RegexError e) { - assert_not_reached(); - } + conversation_topic = Util.summarize_whitespaces_to_space(subject); } else { conversation_topic = null; } -- cgit v1.2.3-70-g09d2