diff options
Diffstat (limited to 'main/src/ui/conversation_summary/message_textview.vala')
-rw-r--r-- | main/src/ui/conversation_summary/message_textview.vala | 8 |
1 files changed, 6 insertions, 2 deletions
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 +} |