popups: only show when manually turning on the feature, not when it's auto-enabled on load

This commit is contained in:
mappu 2017-02-08 18:34:12 +13:00
parent af324441b7
commit 7894355647
1 changed files with 1 additions and 9 deletions

View File

@ -854,7 +854,7 @@ var desktop_notifications_toggle = function(ev) {
persistence_set("notifications", desktop_notifications_enabled);
if (desktop_notifications_enabled) {
desktop_notifications_onEnable();
notify(hub_hubname, "Desktop popups enabled", "tab-main");
}
persistence_set("popups", desktop_notifications_enabled);
@ -862,10 +862,6 @@ var desktop_notifications_toggle = function(ev) {
$el.innerHTML = desktop_notifications_fmtstr();
};
var desktop_notifications_onEnable = function() {
notify(hub_hubname, "Desktop popups enabled", "tab-main");
}
var scrollback_move = function(delta) {
if (chat_scrollback.length === 0) {
return; // no effect
@ -1011,10 +1007,6 @@ window.onload = function() {
should_warn_on_close = persistence_get("warnonclose", false);
desktop_notifications_enabled = persistence_get("popups", false);
if (desktop_notifications_enabled) {
// prompt for permissions
desktop_notifications_onEnable();
}
menu.reset();