Bug 972144 - don't show error notification for LOGIN_FAILED_NOT_READY. r=ttaubert
authorMark Hammond <mhammond@skippinet.com.au>
Fri, 14 Feb 2014 09:06:33 +1100
changeset 168679 56c33addbd2fcc9eeb5042e5ea929a2a14772613
parent 168676 5748e84048b32afacf180a0cc44b3455509cdf46
child 168680 d34e01528ec961017390afee3e9792d6ca6654fe
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersttaubert
bugs972144
milestone30.0a1
Bug 972144 - don't show error notification for LOGIN_FAILED_NOT_READY. r=ttaubert
browser/base/content/browser-syncui.js
--- a/browser/base/content/browser-syncui.js
+++ b/browser/base/content/browser-syncui.js
@@ -156,16 +156,21 @@ let gSyncUI = {
     // if login fails, any other notifications are essentially moot
     Weave.Notifications.removeAll();
 
     // if we haven't set up the client, don't show errors
     if (this._needsSetup()) {
       this.updateUI();
       return;
     }
+    // if we are still waiting for the identity manager to initialize, don't show errors
+    if (Weave.Status.login == Weave.LOGIN_FAILED_NOT_READY) {
+      this.updateUI();
+      return;
+    }
 
     let title = this._stringBundle.GetStringFromName("error.login.title");
 
     let description;
     if (Weave.Status.sync == Weave.PROLONGED_SYNC_FAILURE) {
       // Convert to days
       let lastSync =
         Services.prefs.getIntPref("services.sync.errorhandler.networkFailureReportTimeout") / 86400;