Bug 982241: make the UI observe weave:service:setup-complete so that it gets updated correctly when re-signing in after an auth error, r=ttaubert
authorGavin Sharp <gavin@gavinsharp.com>
Wed, 12 Mar 2014 18:53:35 -0700
changeset 190674 75f3bd5737a6704c456535f206de6c09adbd9381
parent 190673 8260554d3422bea9b0edfa9ccbc830a4adfd105c
child 190675 00a016605d9e874d716f526f341582f5aab66806
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersttaubert
bugs982241
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 982241: make the UI observe weave:service:setup-complete so that it gets updated correctly when re-signing in after an auth error, r=ttaubert Changes: * start observing weave:service:setup-complete to update the UI after all logins (re-auth, initial sign-in) * stop observing FxAccountsCommon.ONLOGIN_NOTIFICATION, since the state we depend on to update the UI never changes interestingly as a result of it firing
browser/base/content/browser-fxaccounts.js
--- a/browser/base/content/browser-fxaccounts.js
+++ b/browser/base/content/browser-fxaccounts.js
@@ -22,17 +22,17 @@ let gFxAccounts = {
 
   get topics() {
     // Do all this dance to lazy-load FxAccountsCommon.
     delete this.topics;
     return this.topics = [
       "weave:service:ready",
       "weave:service:sync:start",
       "weave:service:login:error",
-      FxAccountsCommon.ONLOGIN_NOTIFICATION,
+      "weave:service:setup-complete",
       FxAccountsCommon.ONVERIFIED_NOTIFICATION,
       FxAccountsCommon.ONLOGOUT_NOTIFICATION
     ];
   },
 
   // The set of topics that only the active window should handle.
   get activeWindowTopics() {
     // Do all this dance to lazy-load FxAccountsCommon.