make f a hotkey persistent; obsolete option HIDE_READ_FEEDS
This commit is contained in:
parent
1e5548db54
commit
dbfc952271
|
@ -1505,8 +1505,7 @@ function getInitParam(key) {
|
||||||
return init_params[key];
|
return init_params[key];
|
||||||
}
|
}
|
||||||
|
|
||||||
function storeInitParam(key, value) {
|
function setInitParam(key, value) {
|
||||||
debug("<b>storeInitParam is OBSOLETE: " + key + " => " + value + "</b>");
|
|
||||||
init_params[key] = value;
|
init_params[key] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
$subop = $_REQUEST["subop"];
|
$subop = $_REQUEST["subop"];
|
||||||
|
|
||||||
$prefs_blacklist = array("HIDE_FEEDLIST", "SYNC_COUNTERS", "ENABLE_LABELS",
|
$prefs_blacklist = array("HIDE_FEEDLIST", "SYNC_COUNTERS", "ENABLE_LABELS",
|
||||||
"ENABLE_SEARCH_TOOLBAR");
|
"ENABLE_SEARCH_TOOLBAR", "HIDE_READ_FEEDS");
|
||||||
|
|
||||||
if (FORCE_ARTICLE_PURGE != 0) {
|
if (FORCE_ARTICLE_PURGE != 0) {
|
||||||
array_push($prefs_blacklist, "PURGE_OLD_DAYS");
|
array_push($prefs_blacklist, "PURGE_OLD_DAYS");
|
||||||
|
|
15
tt-rss.js
15
tt-rss.js
|
@ -726,15 +726,18 @@ function updateFeedTitle(t) {
|
||||||
function toggleDispRead() {
|
function toggleDispRead() {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
var hide_read_feeds = (getInitParam("hide_read_feeds") == "1");
|
var hide = !(getInitParam("hide_read_feeds") == "1");
|
||||||
|
|
||||||
hide_read_feeds = !hide_read_feeds;
|
hideOrShowFeeds(hide);
|
||||||
|
|
||||||
debug("toggle_disp_read => " + hide_read_feeds);
|
var query = "?op=rpc&subop=setpref&key=HIDE_READ_FEEDS&value=" +
|
||||||
|
param_escape(hide);
|
||||||
|
|
||||||
hideOrShowFeeds(hide_read_feeds);
|
new Ajax.Request("backend.php", {
|
||||||
|
parameters: query,
|
||||||
storeInitParam("hide_read_feeds", hide_read_feeds, true);
|
onComplete: function(transport) {
|
||||||
|
setInitParam("hide_read_feeds", hide);
|
||||||
|
} });
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
exception_error("toggleDispRead", e);
|
exception_error("toggleDispRead", e);
|
||||||
|
|
Loading…
Reference in New Issue