]> git.0d.be Git - empathy.git/commitdiff
Don't conflate TpfPersona and FolksPersona.
authorTravis Reitter <travis.reitter@collabora.co.uk>
Tue, 3 May 2011 00:21:04 +0000 (17:21 -0700)
committerTravis Reitter <travis.reitter@collabora.co.uk>
Mon, 6 Jun 2011 16:30:51 +0000 (09:30 -0700)
libempathy-gtk/empathy-individual-store.c
libempathy-gtk/empathy-individual-widget.c

index ef786d7e3f9501b7cb49a569916bfd5832b2fded..b804b225907e25ca08ff6c2e02209e74c70f9b52 100644 (file)
@@ -166,8 +166,8 @@ individual_get_client_types (FolksIndividual *individual)
     {
       FolksPresenceDetails *presence;
 
-      /* We only want personas which implement FolksPresenceDetails */
-      if (!FOLKS_IS_PRESENCE_DETAILS (l->data))
+      /* We only want personas which have presence and a TpContact */
+      if (!empathy_folks_persona_is_interesting (persona))
         continue;
 
       presence = FOLKS_PRESENCE_DETAILS (l->data);
index dc45191a6303cfc0a904fc0a9a5d5fc519c5529a..d0697d2611491a3630f094adbe0a0dc2337e1926 100644 (file)
@@ -229,20 +229,20 @@ update_weak_contact (EmpathyIndividualWidget *self)
       for (l = personas; l != NULL; l = l->next)
         {
           FolksPresenceDetails *presence;
+          FolksPresenceType presence_type_cur;
 
-          /* We only want personas which implement FolksPresence */
-          if (!FOLKS_IS_PRESENCE_DETAILS (l->data))
+          /* We only want personas which have presence and a TpContact */
+          if (!empathy_folks_persona_is_interesting (FOLKS_PERSONA (presence)))
             continue;
 
           presence = FOLKS_PRESENCE_DETAILS (l->data);
+          presence_type_cur = folks_presence_details_get_presence_type (
+              presence);
 
           if (folks_presence_details_typecmp (
-                  folks_presence_details_get_presence_type (presence),
-                  presence_type) > 0 &&
-              empathy_folks_persona_is_interesting (FOLKS_PERSONA (presence)))
+                presence_type_cur, presence_type) > 0)
             {
-              presence_type = folks_presence_details_get_presence_type (
-                  presence);
+              presence_type = presence_type_cur;
               tp_contact = tpf_persona_get_contact (TPF_PERSONA (l->data));
             }
         }