diff options
author | fiaxh <git@lightrise.org> | 2019-09-10 19:11:41 +0200 |
---|---|---|
committer | fiaxh <fiaxh@users.noreply.github.com> | 2019-09-10 19:36:11 +0200 |
commit | bd7fde99af3df59c5ec96184b2649b4308250b24 (patch) | |
tree | 49f67c73f6ecc69bb949ea81b49814c90a13f0bd /main/src/ui/unified_window_controller.vala | |
parent | d5d305193ce527f1cc3022c406de35d9a85d4ccb (diff) | |
download | dino-bd7fde99af3df59c5ec96184b2649b4308250b24.tar.gz dino-bd7fde99af3df59c5ec96184b2649b4308250b24.zip |
fixup Fix some warnings
Diffstat (limited to 'main/src/ui/unified_window_controller.vala')
-rw-r--r-- | main/src/ui/unified_window_controller.vala | 12 |
1 files changed, 2 insertions, 10 deletions
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; } |