From ca331e85efe2a74a6b9b5a5ff0fbcd10a36758ce Mon Sep 17 00:00:00 2001 From: Marvin W Date: Tue, 16 Jan 2018 16:17:42 +0100 Subject: Render avatar on demand --- main/src/ui/conversation_summary/conversation_item_skeleton.vala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main/src/ui/conversation_summary/conversation_item_skeleton.vala') diff --git a/main/src/ui/conversation_summary/conversation_item_skeleton.vala b/main/src/ui/conversation_summary/conversation_item_skeleton.vala index 127f0179..33d135fc 100644 --- a/main/src/ui/conversation_summary/conversation_item_skeleton.vala +++ b/main/src/ui/conversation_summary/conversation_item_skeleton.vala @@ -9,7 +9,7 @@ namespace Dino.Ui.ConversationSummary { public class ConversationItemSkeleton : Box { - private Image image = new Image() { margin_top=2, valign=Align.START, visible=true }; + private AvatarImage image = new AvatarImage() { margin_top=2, valign=Align.START, visible=true, allow_gray = false }; public StreamInteractor stream_interactor; public Conversation conversation { get; set; } @@ -24,7 +24,7 @@ public class ConversationItemSkeleton : Box { this.stream_interactor = stream_interactor; if (item.requires_avatar) { - Util.image_set_from_scaled_pixbuf(image, (new AvatarGenerator(32, 32, image.scale_factor)).set_greyscale(item.dim).draw_jid(stream_interactor, item.jid, conversation.account)); + image.set_jid(stream_interactor, item.jid, conversation.account); } if (item.display_time != null) { default_header = new DefaultSkeletonHeader(stream_interactor, conversation, item) { visible=true }; -- cgit v1.2.3-54-g00ecf