From 9ea16b6d8568cb383eb1f469d1dc54bfcad4f188 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Mon, 16 Oct 2017 00:23:51 +0200 Subject: PGP encrypted file transfers --- main/src/ui/conversation_summary/file_populator.vala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main/src/ui/conversation_summary') diff --git a/main/src/ui/conversation_summary/file_populator.vala b/main/src/ui/conversation_summary/file_populator.vala index d1a26d12..99185f6b 100644 --- a/main/src/ui/conversation_summary/file_populator.vala +++ b/main/src/ui/conversation_summary/file_populator.vala @@ -41,7 +41,7 @@ class FilePopulator : Plugins.ConversationItemPopulator, Object { public void populate_between_widgets(Conversation conversation, DateTime from, DateTime to) { } private void insert_file(FileTransfer transfer) { - if (transfer.mime_type.has_prefix("image")) { + if (transfer.mime_type != null && transfer.mime_type.has_prefix("image")) { item_collection.insert_item(new ImageItem(stream_interactor, transfer)); } } @@ -81,7 +81,7 @@ public class ImageItem : Plugins.MetaConversationItem { public override Object get_widget(Plugins.WidgetType widget_type) { Image image = new Image() { halign=Align.START, visible = true }; - Gdk.Pixbuf pixbuf = new Gdk.Pixbuf.from_stream(file_transfer.input_stream); + Gdk.Pixbuf pixbuf = new Gdk.Pixbuf.from_file(file_transfer.get_uri()); int max_scaled_height = MAX_HEIGHT * image.scale_factor; if (pixbuf.height > max_scaled_height) { -- cgit v1.2.3-70-g09d2