Bug 631942 - Prevent Sync Now from blocking the menu (port bug 597788 and bug 631918). r=Neil
authorJens Hatlak <jh@junetz.de>
Mon, 07 Feb 2011 01:00:04 +0100
changeset 7094 c7d38399359a3a014e1943f3cbeaa2afe785bbbb
parent 7093 cc940d2a1b9f9035fbe4b15b17428c7d9b68e0c2
child 7095 892088e4ead3cd97f98263f54414f52500e7d9aa
push id5431
push userjh@junetz.de
push dateMon, 07 Feb 2011 00:01:41 +0000
treeherdercomm-central@c7d38399359a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersNeil
bugs631942, 597788, 631918
Bug 631942 - Prevent Sync Now from blocking the menu (port bug 597788 and bug 631918). r=Neil
suite/common/sync/syncUI.js
--- a/suite/common/sync/syncUI.js
+++ b/suite/common/sync/syncUI.js
@@ -254,27 +254,18 @@ let gSyncUI = {
   },
 
   openServerStatus: function () {
     let statusURL = Services.prefs.getCharPref("services.sync.statusURL");
     openUILinkIn(statusURL, "tab");
   },
 
   // Commands
-  doLogin: function SUI_doLogin() {
-    Weave.Service.login();
-  },
-
-  doLogout: function SUI_doLogout() {
-    Weave.Service.logout();
-  },
-
   doSync: function SUI_doSync() {
-    if (Weave.Service.isLoggedIn || Weave.Service.login())
-      Weave.Service.sync();
+    setTimeout(function() Weave.Service.sync(), 0);
   },
 
   handleToolbarButton: function SUI_handleToolbarButton() {
     if (this._needsSetup())
       this.openSetup();
     else
       this.doSync();
   },