diff options
author | Niels De Graef <nielsdegraef@gmail.com> | 2018-01-22 17:38:00 +0100 |
---|---|---|
committer | Niels De Graef <nielsdegraef@gmail.com> | 2018-01-22 17:38:00 +0100 |
commit | b4822d1040af1ff5858fe22924acbfb75a96ca7d (patch) | |
tree | 95dd1fe831db0feee2d85f70e9a8a810c015bd6e /src/contacts-contact-sheet.vala | |
parent | 6c65b72e18c6854f531999287063f9ec2f0c6fde (diff) | |
download | gnome-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-sheet.vala')
-rw-r--r-- | src/contacts-contact-sheet.vala | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/contacts-contact-sheet.vala b/src/contacts-contact-sheet.vala index 88c0bb1..8467f46 100644 --- a/src/contacts-contact-sheet.vala +++ b/src/contacts-contact-sheet.vala @@ -96,12 +96,9 @@ public class Contacts.ContactSheet : Grid { } public void update (Contact c) { - var image_frame = new Avatar (PROFILE_SIZE); + var image_frame = new Avatar (PROFILE_SIZE, c); image_frame.set_vexpand (false); image_frame.set_valign (Align.START); - c.keep_widget_uptodate (image_frame, (w) => { - (w as Avatar).set_image.begin (c.individual, c); - }); attach (image_frame, 0, 0, 1, 3); var name_label = new Label (null); |