diff options
author | hrxi <hrrrxi@gmail.com> | 2019-09-01 18:18:25 +0200 |
---|---|---|
committer | fiaxh <fiaxh@users.noreply.github.com> | 2019-09-10 19:36:11 +0200 |
commit | d5d305193ce527f1cc3022c406de35d9a85d4ccb (patch) | |
tree | d12efc741319a7d71c13f7bf6c2c7579d25fdabe /main/src/ui/conversation_selector | |
parent | 9950742bf1903291c271619aea101b0e2f81d19c (diff) | |
download | dino-d5d305193ce527f1cc3022c406de35d9a85d4ccb.tar.gz dino-d5d305193ce527f1cc3022c406de35d9a85d4ccb.zip |
Fix some warnings
Instances of `RegexError` are just asserted as `assert_not_reached` as
they cannot really fail except for allocation failure if the given regex
is valid.
Diffstat (limited to 'main/src/ui/conversation_selector')
-rw-r--r-- | main/src/ui/conversation_selector/conversation_selector_row.vala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main/src/ui/conversation_selector/conversation_selector_row.vala b/main/src/ui/conversation_selector/conversation_selector_row.vala index 37b8ebde..46f6c1a8 100644 --- a/main/src/ui/conversation_selector/conversation_selector_row.vala +++ b/main/src/ui/conversation_selector/conversation_selector_row.vala @@ -136,7 +136,11 @@ public class ConversationSelectorRow : ListBoxRow { nick_label.label = last_message.direction == Message.DIRECTION_SENT ? _("Me") + ": " : ""; } - message_label.label = Markup.escape_text((/\s+/).replace_literal(last_message.body, -1, 0, " ")); + try { + message_label.label = Markup.escape_text((/\s+/).replace_literal(last_message.body, -1, 0, " ")); + } catch (RegexError e) { + assert_not_reached(); + } break; case FileItem.TYPE: FileItem file_item = last_content_item as FileItem; |