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/contact_details/dialog.vala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main/src/ui/contact_details') diff --git a/main/src/ui/contact_details/dialog.vala b/main/src/ui/contact_details/dialog.vala index 422a0e0e..fd3b4751 100644 --- a/main/src/ui/contact_details/dialog.vala +++ b/main/src/ui/contact_details/dialog.vala @@ -10,7 +10,7 @@ namespace Dino.Ui.ContactDetails { [GtkTemplate (ui = "/im/dino/Dino/contact_details_dialog.ui")] public class Dialog : Gtk.Dialog { - [GtkChild] public Image avatar; + [GtkChild] public AvatarImage avatar; [GtkChild] public Util.EntryLabelHybrid name_hybrid; [GtkChild] public Label name_label; [GtkChild] public Label jid_label; @@ -70,7 +70,7 @@ public class Dialog : Gtk.Dialog { } jid_label.label = conversation.counterpart.to_string(); account_label.label = "via " + conversation.account.bare_jid.to_string(); - Util.image_set_from_scaled_pixbuf(avatar, (new AvatarGenerator(50, 50, avatar.scale_factor)).draw_conversation(stream_interactor, conversation)); + avatar.set_jid(stream_interactor, conversation.counterpart, conversation.account); } private void add_entry(string category, string label, string? description, Object wo) { -- cgit v1.2.3-70-g09d2