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



commit 271c96a648137836cd3078964daa37305b6b266a
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 66b612e..f625a91 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]