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>
This commit is contained in:
parent
b5f6d97fa2
commit
6f674f21f6
1 changed files with 5 additions and 1 deletions
|
@ -135,6 +135,10 @@ const Notifier = {
|
||||||
const plaf = PlatformPeg.get();
|
const plaf = PlatformPeg.get();
|
||||||
if (!plaf) return;
|
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);
|
Analytics.trackEvent('Notifier', 'Set Enabled', enable);
|
||||||
|
|
||||||
// make sure that we persist the current setting audio_enabled setting
|
// 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
|
// clear the notifications_hidden flag, so that if notifications are
|
||||||
// disabled again in the future, we will show the banner again.
|
// disabled again in the future, we will show the banner again.
|
||||||
this.setToolbarHidden(false);
|
this.setToolbarHidden(true);
|
||||||
} else {
|
} else {
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: "notifier_enabled",
|
action: "notifier_enabled",
|
||||||
|
|
Loading…
Reference in a new issue