From 8bc0d107e740be468ee0c9dcd253de36355088d3 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sun, 27 Aug 2017 23:55:49 +0200 Subject: Plugins providing conversation items for ConversationView --- main/src/ui/conversation_summary/message_textview.vala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'main/src/ui/conversation_summary/message_textview.vala') diff --git a/main/src/ui/conversation_summary/message_textview.vala b/main/src/ui/conversation_summary/message_textview.vala index 80759207..f2a4ca22 100644 --- a/main/src/ui/conversation_summary/message_textview.vala +++ b/main/src/ui/conversation_summary/message_textview.vala @@ -27,7 +27,11 @@ public class MessageTextView : TextView { minimum_width = 0; } - public void add_text(string text) { + public void add_text(string text_) { + string text = text_; + if (text.length > 10000) { + text = text.slice(0, 10000) + " [" + _("Message too long") + "]"; + } TextIter end; buffer.get_end_iter(out end); buffer.insert(ref end, text, -1); @@ -90,4 +94,4 @@ public class MessageTextView : TextView { } } -} \ No newline at end of file +} -- cgit v1.3