Don't set Individual.is-favourite when updating from Personas
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Tue, 31 Aug 2010 15:31:56 +0000 (16:31 +0100)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Tue, 31 Aug 2010 15:31:56 +0000 (16:31 +0100)
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

index f8c7f0b..d20bc3d 100644 (file)
@@ -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 ()