[folks] e-d-s: Only set avatar if store_avatar () was successful



commit e3017a4bfc6a6940e2fb91dd8022ab8f817e9cbb
Author: Raul Gutierrez Segales <rgs collabora co uk>
Date:   Thu Aug 4 16:09:12 2011 +0100

    e-d-s: Only set avatar if store_avatar () was successful
    
    Helps: https://bugzilla.gnome.org/show_bug.cgi?id=655374

 backends/eds/lib/edsf-persona.vala |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/backends/eds/lib/edsf-persona.vala b/backends/eds/lib/edsf-persona.vala
index 4a3baf5..804ca60 100644
--- a/backends/eds/lib/edsf-persona.vala
+++ b/backends/eds/lib/edsf-persona.vala
@@ -780,6 +780,8 @@ public class Edsf.Persona : Folks.Persona,
               try
                 {
                   cache.store_avatar.end (res);
+                  this._avatar = new_avatar;
+                  this.notify_property ("avatar");
                 }
               catch (GLib.Error e2)
                 {
@@ -787,9 +789,6 @@ public class Edsf.Persona : Folks.Persona,
                       this.uid, e2.message);
                   new_avatar = null; /* failure */
                 }
-
-              this._avatar = new_avatar;
-              this.notify_property ("avatar");
             });
         }
     }



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