e-d-s: Don't infer we already have an avatar in our cache by its URI
authorRaul Gutierrez Segales <rgs@collabora.co.uk>
Thu, 4 Aug 2011 14:55:09 +0000 (15:55 +0100)
committerRaul Gutierrez Segales <rgs@collabora.co.uk>
Wed, 17 Aug 2011 18:11:04 +0000 (19:11 +0100)
From libfolks we should discourage using local URIs to
set an EContactPhoto so even if we get inlined EContactPhoto
just do a full content comparison.

Helps: https://bugzilla.gnome.org/show_bug.cgi?id=655374

backends/eds/lib/edsf-persona.vala

index 9328706..f013bd6 100644 (file)
@@ -751,17 +751,6 @@ public class Edsf.Persona : Folks.Persona,
       E.ContactPhoto? p = (E.ContactPhoto) this._get_property ("photo");
 
       var cache = AvatarCache.dup ();
-      var cache_uri = cache.build_uri_for_avatar (this.uid);
-
-      /* Check the avatar isn't being set by our PersonaStore; if it is, just
-       * notify the property and bail. This avoids circular updates to the
-       * cache. */
-      if (p != null &&
-          p.type == ContactPhotoType.URI && p.get_uri () == cache_uri)
-        {
-          this.notify_property ("avatar");
-          return;
-        }
 
       // Convert the ContactPhoto to a LoadableIcon and store or update it.
       var new_avatar = this._contact_photo_to_loadable_icon (p);