[folks] libsocialweb: make PersonaStores immediately quiescent



commit 81d9e2ca8c24d589c463d6ea7c637315122d3292
Author: Raul Gutierrez Segales <rgs collabora co uk>
Date:   Mon Sep 5 22:25:56 2011 +0100

    libsocialweb: make PersonaStores immediately quiescent
    
    Because we don't know if a libsocialweb service has 0
    contacts or is not well configured or is not authenticated, etc.;
    we might end up forever for contacts to arrive and never
    achieve quiescence. Until libsocialweb provides us with more
    information about the status of service (is it configured and
    authenticated? How many contacts should we receive? etc.) we
    immediately declare it quiescent after preparing it.

 backends/libsocialweb/lib/swf-persona-store.vala |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/backends/libsocialweb/lib/swf-persona-store.vala b/backends/libsocialweb/lib/swf-persona-store.vala
index 89fd6d2..2e6a1e7 100644
--- a/backends/libsocialweb/lib/swf-persona-store.vala
+++ b/backends/libsocialweb/lib/swf-persona-store.vala
@@ -243,6 +243,23 @@ public class Swf.PersonaStore : Folks.PersonaStore
                           this._is_prepared = true;
                           this.notify_property ("is-prepared");
 
+                          /* FIXME: for lsw Stores with 0 contacts or badly
+                           * configured (or not authenticated, etc) we are
+                           * condemned to never reach quiescence if we wait for
+                           * contacts to be added. A possible way around this
+                           * would be, if libsocialweb provided such properties,
+                           * to query the social client to see if it's available
+                           * (authenticated and ready) and the number of
+                           * contacts that we would (eventually) get. That is
+                           * the only way we could ever reach quiescence without
+                           * waiting for eternity.
+                           *
+                           * See:
+                           * https://bugzilla.gnome.org/show_bug.cgi?id=656184
+                           */
+                          this._is_quiescent = true;
+                          this.notify_property ("is-quiescent");
+
                           this._contact_view.start ();
                         });
                     });



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