mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-24 05:51:28 +00:00
invalidate local cache when view mode/limit is changed
This commit is contained in:
13
tt-rss.js
13
tt-rss.js
@@ -823,7 +823,14 @@ function collapse_feedlist() {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
exception_error(e, "toggle_feedlist");
|
exception_error(e, "toggle_feedlist");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function viewModeChanged() {
|
||||||
|
cache_empty();
|
||||||
|
return viewCurrentFeed(0, '')
|
||||||
|
}
|
||||||
|
|
||||||
|
function viewLimitChanged() {
|
||||||
|
cache_empty();
|
||||||
|
return viewCurrentFeed(0, '')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ window.onload = init;
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php echo __('View:') ?>
|
<?php echo __('View:') ?>
|
||||||
<select name="view_mode" onchange="viewCurrentFeed(0, '')">
|
<select name="view_mode" onchange="viewModeChanged()">
|
||||||
<option selected value="adaptive"><?php echo __('Adaptive') ?></option>
|
<option selected value="adaptive"><?php echo __('Adaptive') ?></option>
|
||||||
<option value="all_articles"><?php echo __('All Articles') ?></option>
|
<option value="all_articles"><?php echo __('All Articles') ?></option>
|
||||||
<option value="marked"><?php echo __('Starred') ?></option>
|
<option value="marked"><?php echo __('Starred') ?></option>
|
||||||
@@ -202,7 +202,7 @@ window.onload = init;
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_select_hash("limit", $def_art_limit, $limits,
|
print_select_hash("limit", $def_art_limit, $limits,
|
||||||
'onchange="viewCurrentFeed(0, \'\')"');
|
'onchange="viewLimitChanged()"');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
@@ -1508,6 +1508,10 @@ function cache_expire() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function cache_empty() {
|
||||||
|
article_cache = new Array();
|
||||||
|
}
|
||||||
|
|
||||||
function cache_invalidate(id) {
|
function cache_invalidate(id) {
|
||||||
var i = 0
|
var i = 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user