libsocialweb: make PersonaStores immediately quiescent
authorRaul Gutierrez Segales <rgs@collabora.co.uk>
Mon, 5 Sep 2011 21:25:56 +0000 (22:25 +0100)
committerRaul Gutierrez Segales <rgs@collabora.co.uk>
Mon, 5 Sep 2011 21:52:11 +0000 (22:52 +0100)
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

index 89fd6d2..2e6a1e7 100644 (file)
@@ -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 ();
                         });
                     });