Commit 67c89ced authored by Manvel Saroyan's avatar Manvel Saroyan Committed by Winsley

Issue 6736 - Make 'Show useful notifications' option persistent

parent 8420076f
......@@ -1383,35 +1383,12 @@ function getPrefElement(key)
function getPref(key, callback)
{
const checkPref = getPref.checks[key] || getPref.checkNone;
checkPref((isActive) =>
{
if (!isActive)
{
hidePref(key, !isActive);
return;
}
browser.runtime.sendMessage({
type: "prefs.get",
key
}, callback);
});
browser.runtime.sendMessage({
type: "prefs.get",
key
}, callback);
}
getPref.checkNone = function(callback)
{
callback(true);
};
getPref.checks =
{
notifications_ignoredcategories(callback)
{
getPref("notifications_showui", callback);
}
};
function onPrefMessage(key, value, initial)
{
switch (key)
......@@ -1419,10 +1396,6 @@ function onPrefMessage(key, value, initial)
case "notifications_ignoredcategories":
value = value.indexOf("*") == -1;
break;
case "notifications_showui":
hidePref("notifications_ignoredcategories", !value);
break;
case "ui_warn_tracking":
setPrivacyConflict();
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment