aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/unified_window_controller.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-09-10 19:11:41 +0200
committerfiaxh <fiaxh@users.noreply.github.com>2019-09-10 19:36:11 +0200
commitbd7fde99af3df59c5ec96184b2649b4308250b24 (patch)
tree49f67c73f6ecc69bb949ea81b49814c90a13f0bd /main/src/ui/unified_window_controller.vala
parentd5d305193ce527f1cc3022c406de35d9a85d4ccb (diff)
downloaddino-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.vala12
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;
}