Hide the notification nag bar after enabling notifications

and add a bit of documentation around why the notificationsEnabled setting isn't set here.

Signed-off-by: Travis Ralston <travpc@gmail.com>
pull/21833/head
Travis Ralston 2017-12-25 13:27:23 -07:00
parent b5f6d97fa2
commit 6f674f21f6
1 changed files with 5 additions and 1 deletions

View File

@ -135,6 +135,10 @@ const Notifier = {
const plaf = PlatformPeg.get();
if (!plaf) return;
// Dev note: We don't set the "notificationsEnabled" setting to true here because it is a
// calculated value. It is determined based upon whether or not the master rule is enabled
// and other flags. Setting it here would cause a circular reference.
Analytics.trackEvent('Notifier', 'Set Enabled', enable);
// make sure that we persist the current setting audio_enabled setting
@ -168,7 +172,7 @@ const Notifier = {
});
// clear the notifications_hidden flag, so that if notifications are
// disabled again in the future, we will show the banner again.
this.setToolbarHidden(false);
this.setToolbarHidden(true);
} else {
dis.dispatch({
action: "notifier_enabled",