Bug 1370746 - about:prefs#sync listens for more FxA account state notifications. r?eoger draft
authorMark Hammond <mhammond@skippinet.com.au>
Wed, 07 Jun 2017 17:16:21 +1000
changeset 590147 476be9e757155a000e69c60f62b27174cf210b91
parent 590112 bc831122d788656a2b3287ff6e1340d72e6fdd52
child 632100 d509e262450483d8351a003768643f3fb2a9f74d
push id62607
push userbmo:markh@mozilla.com
push dateWed, 07 Jun 2017 07:16:44 +0000
reviewerseoger
bugs1370746
milestone55.0a1
Bug 1370746 - about:prefs#sync listens for more FxA account state notifications. r?eoger MozReview-Commit-ID: CcixuCOKjLS
browser/components/preferences/in-content-new/sync.js
browser/components/preferences/in-content/sync.js
--- a/browser/components/preferences/in-content-new/sync.js
+++ b/browser/components/preferences/in-content-new/sync.js
@@ -90,16 +90,17 @@ var gSyncPane = {
   _init() {
     let topics = ["weave:service:login:error",
                   "weave:service:login:finish",
                   "weave:service:start-over:finish",
                   "weave:service:setup-complete",
                   "weave:service:logout:finish",
                   FxAccountsCommon.ONVERIFIED_NOTIFICATION,
                   FxAccountsCommon.ONLOGIN_NOTIFICATION,
+                  FxAccountsCommon.ON_ACCOUNT_STATE_CHANGE_NOTIFICATION,
                   FxAccountsCommon.ON_PROFILE_CHANGE_NOTIFICATION,
                   ];
     // Add the observers now and remove them on unload
     // XXXzpao This should use Services.obs.* but Weave's Obs does nice handling
     //        of `this`. Fix in a followup. (bug 583347)
     topics.forEach(function(topic) {
       Weave.Svc.Obs.add(topic, this.updateWeavePrefs, this);
     }, this);
--- a/browser/components/preferences/in-content/sync.js
+++ b/browser/components/preferences/in-content/sync.js
@@ -90,16 +90,17 @@ var gSyncPane = {
   _init() {
     let topics = ["weave:service:login:error",
                   "weave:service:login:finish",
                   "weave:service:start-over:finish",
                   "weave:service:setup-complete",
                   "weave:service:logout:finish",
                   FxAccountsCommon.ONVERIFIED_NOTIFICATION,
                   FxAccountsCommon.ONLOGIN_NOTIFICATION,
+                  FxAccountsCommon.ON_ACCOUNT_STATE_CHANGE_NOTIFICATION,
                   FxAccountsCommon.ON_PROFILE_CHANGE_NOTIFICATION,
                   ];
     // Add the observers now and remove them on unload
     // XXXzpao This should use Services.obs.* but Weave's Obs does nice handling
     //        of `this`. Fix in a followup. (bug 583347)
     topics.forEach(function(topic) {
       Weave.Svc.Obs.add(topic, this.updateWeavePrefs, this);
     }, this);