[empathy] Add individuals to the EmpathyIndividualStore before updating them



commit 2fb2a77597bdcbe2ee18e3d5c1d0fa79ced11d2d
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Wed Sep 15 16:22:30 2010 +0100

    Add individuals to the EmpathyIndividualStore before updating them
    
    When adding a new contact _with_ an alias set, the code in
    EmpathyIndividualStore was listening to (and acting on) property notifications
    (such as alias changes) for the individual before adding the individual to the
    store, resulting in duplicate contact listings. Closes: bgo#629380

 libempathy-gtk/empathy-individual-store.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-individual-store.c b/libempathy-gtk/empathy-individual-store.c
index 985b6e3..77f3016 100644
--- a/libempathy-gtk/empathy-individual-store.c
+++ b/libempathy-gtk/empathy-individual-store.c
@@ -874,6 +874,8 @@ static void
 individual_store_add_individual_and_connect (EmpathyIndividualStore *self,
     FolksIndividual *individual)
 {
+  individual_store_add_individual (self, individual);
+
   g_signal_connect (individual, "notify::avatar",
       (GCallback) individual_store_individual_updated_cb, self);
   g_signal_connect (individual, "notify::presence-type",
@@ -887,7 +889,6 @@ individual_store_add_individual_and_connect (EmpathyIndividualStore *self,
 
   individual_personas_changed_cb (individual,
       folks_individual_get_personas (individual), NULL, self);
-  individual_store_add_individual (self, individual);
 }
 
 static void



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