[folks] Don't announce removal of Individuals twice.



commit 39bf15f146f6ec29010b8d71330a98809c097d6a
Author: Travis Reitter <travis reitter collabora co uk>
Date:   Tue Jan 11 11:31:10 2011 -0800

    Don't announce removal of Individuals twice.
    
    Before this patch, we would announce an Individual's removal, "dispose" of the
    individual, then announce their removal again (at which point they would have
    zero Personas, which can make it harder for clients to do anything useful with
    the notification anyhow).
    
    Helps: bgo#639113

 folks/individual-aggregator.vala |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
index b55a876..4a56707 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -701,7 +701,9 @@ public class Folks.IndividualAggregator : Object
           debug ("Individual '%s' removed (not replaced)", i.id);
         }
 
-      this.individuals_changed (null, i_list, null, null, 0);
+      /* If the individual has 0 personas, we've already signaled removal */
+      if (i.personas.length () > 0)
+        this.individuals_changed (null, i_list, null, null, 0);
       this.individuals.remove (i.id);
     }
 



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