summaryrefslogtreecommitdiff
path: root/src/contacts-contact-list.vala
diff options
context:
space:
mode:
authorNiels De Graef <nielsdegraef@gmail.com>2018-01-22 17:38:00 +0100
committerNiels De Graef <nielsdegraef@gmail.com>2018-01-22 17:38:00 +0100
commitb4822d1040af1ff5858fe22924acbfb75a96ca7d (patch)
tree95dd1fe831db0feee2d85f70e9a8a810c015bd6e /src/contacts-contact-list.vala
parent6c65b72e18c6854f531999287063f9ec2f0c6fde (diff)
downloadgnome-contacts-b4822d1040af1ff5858fe22924acbfb75a96ca7d.tar.gz
Avatar: lazily load the Pixbuf of the avatar.
This should again decrease our memory usage in most cases.
Diffstat (limited to 'src/contacts-contact-list.vala')
-rw-r--r--src/contacts-contact-list.vala3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/contacts-contact-list.vala b/src/contacts-contact-list.vala
index 2aa2b85..618ecc8 100644
--- a/src/contacts-contact-list.vala
+++ b/src/contacts-contact-list.vala
@@ -44,7 +44,7 @@ public class Contacts.ContactList : ListBox {
grid.margin = 3;
grid.margin_start = 9;
grid.set_column_spacing (10);
- this.avatar = new Avatar (LIST_AVATAR_SIZE);
+ this.avatar = new Avatar (LIST_AVATAR_SIZE, this.contact);
this.label = new Label (c.individual.display_name);
this.label.ellipsize = Pango.EllipsizeMode.END;
@@ -71,7 +71,6 @@ public class Contacts.ContactList : ListBox {
public void update () {
// Update widgets
this.label.set_text (this.contact.individual.display_name);
- this.avatar.set_image.begin (this.contact.individual, this.contact);
}
// Sets whether the checbox should always be shown (and not only on hover)