diff options
author | fiaxh <git@mx.ax.lt> | 2017-10-16 00:23:51 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-10-22 18:26:31 +0200 |
commit | 9ea16b6d8568cb383eb1f469d1dc54bfcad4f188 (patch) | |
tree | 27da8705fc99f2407af5e60083e34ddeeff39630 /main/src/ui/conversation_summary | |
parent | 8b43df8ec3f92477f857280668a9f29f0b9d6229 (diff) | |
download | dino-9ea16b6d8568cb383eb1f469d1dc54bfcad4f188.tar.gz dino-9ea16b6d8568cb383eb1f469d1dc54bfcad4f188.zip |
PGP encrypted file transfers
Diffstat (limited to 'main/src/ui/conversation_summary')
-rw-r--r-- | main/src/ui/conversation_summary/file_populator.vala | 4 |
1 files changed, 2 insertions, 2 deletions
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) { |