[folks] Don't set Individual.is-favourite when updating from Personas



commit c905237fd9d215ee2a90f423101d7d20c604c8c5
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Tue Aug 31 16:31:56 2010 +0100

    Don't set Individual.is-favourite when updating from Personas
    
    Set the private Individual._is_favourite member instead, to prevent the new
    favourite status from being pushed down to all the Personas and stomping all
    over their favourite statuses. See also: bgo#628131

 folks/individual.vala |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/folks/individual.vala b/folks/individual.vala
index f8c7f0b..d20bc3d 100644
--- a/folks/individual.vala
+++ b/folks/individual.vala
@@ -495,9 +495,14 @@ public class Folks.Individual : Object,
             }
         });
 
-      /* Only notify if the value has changed */
-      if (this.is_favourite != favourite)
-        this.is_favourite = favourite;
+      /* Only notify if the value has changed. We have to set the private member
+       * and notify manually, or we'd end up propagating the new favourite
+       * status back down to all our Personas. */
+      if (this._is_favourite != favourite)
+        {
+          this._is_favourite = favourite;
+          this.notify_property ("is-favourite");
+        }
     }
 
   private void update_alias ()



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