[gnome-contacts] ContactSheet: don't duplicate fields when updating.



commit 9983d69864d81c3306121e6a6f048979c9831c71
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Sat Nov 17 18:07:59 2018 +0100

    ContactSheet: don't duplicate fields when updating.
    
    This fixes a bug where, if a contact is updated, instead of the current
    fields being replaced, they got added again.

 src/contacts-contact-sheet.vala | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/contacts-contact-sheet.vala b/src/contacts-contact-sheet.vala
index 3ac3a79..62f2e3f 100644
--- a/src/contacts-contact-sheet.vala
+++ b/src/contacts-contact-sheet.vala
@@ -84,6 +84,9 @@ public class Contacts.ContactSheet : ContactForm {
   }
 
   private void update () {
+    this.last_row = 0;
+    this.container_grid.foreach ((child) => this.container_grid.remove (child));
+
     var image_frame = new Avatar (PROFILE_SIZE, this.contact);
     image_frame.set_vexpand (false);
     image_frame.set_valign (Align.START);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]