[frogr] Always fetch account related information in _fetch_everything().



commit e6f867fd963023644dd5c5c901c0ece720ce72f9
Author: Mario Sanchez Prada <msanchez igalia com>
Date:   Fri Aug 5 17:44:37 2011 +0200

    Always fetch account related information in _fetch_everything().
    
    These are really cheap requests, and alwasy fetching that information
    (regardless of the force_fetch parameter) will help to have the UI
    always up to date (e.g. right after configuring a proxy).

 src/frogr-controller.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/src/frogr-controller.c b/src/frogr-controller.c
index 244dd7e..bb59bef 100644
--- a/src/frogr-controller.c
+++ b/src/frogr-controller.c
@@ -1163,18 +1163,17 @@ _fetch_everything (FrogrController *self, gboolean force_fetch)
 
   priv = FROGR_CONTROLLER_GET_PRIVATE (self);
 
-  if (force_fetch || !priv->account_info_fetched)
-    _fetch_account_info (self);
-
-  if (force_fetch || !priv->account_extra_info_fetched)
-    _fetch_account_extra_info (self);
+  /* Account information are cheap requests so we always retrieve that
+     info to ensure it's always up to date (regadless 'force_fetch') */
+  _fetch_account_info (self);
+  _fetch_account_extra_info (self);
 
+  /* Sets, groups and tags can take much longer to retrieve, so we
+     only retrieve that if actually needed (or asked to) */
   if (force_fetch || !priv->sets_fetched)
     _fetch_sets (self);
-
   if (force_fetch || !priv->groups_fetched)
     _fetch_groups (self);
-
   if (force_fetch || !priv->tags_fetched)
     _fetch_tags (self);
 }



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