diff options
author | Andrew Dolgov <[email protected]> | 2008-02-23 06:44:13 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2008-02-23 06:44:13 +0100 |
commit | 3c2d7945ae04e219eaa6206c745e314b1492e574 (patch) | |
tree | 727ce0cf882f081a8488c0f377e5e2ea8a58e27b | |
parent | 93c841c4e52b938d97aff9f08956156c765b725c (diff) |
invalidate local cache when view mode/limit is changed
-rw-r--r-- | tt-rss.js | 9 | ||||
-rw-r--r-- | tt-rss.php | 4 | ||||
-rw-r--r-- | viewfeed.js | 4 |
3 files changed, 14 insertions, 3 deletions
@@ -823,7 +823,14 @@ function collapse_feedlist() { } catch (e) { exception_error(e, "toggle_feedlist"); } +} +function viewModeChanged() { + cache_empty(); + return viewCurrentFeed(0, '') +} - +function viewLimitChanged() { + cache_empty(); + return viewCurrentFeed(0, '') } diff --git a/tt-rss.php b/tt-rss.php index 4ad0a09bc..e491cc717 100644 --- a/tt-rss.php +++ b/tt-rss.php @@ -178,7 +178,7 @@ window.onload = init; <?php } ?> <?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 value="all_articles"><?php echo __('All Articles') ?></option> <option value="marked"><?php echo __('Starred') ?></option> @@ -202,7 +202,7 @@ window.onload = init; } print_select_hash("limit", $def_art_limit, $limits, - 'onchange="viewCurrentFeed(0, \'\')"'); + 'onchange="viewLimitChanged()"'); ?> diff --git a/viewfeed.js b/viewfeed.js index 2eef820e8..79dbe0037 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -1508,6 +1508,10 @@ function cache_expire() { } } +function cache_empty() { + article_cache = new Array(); +} + function cache_invalidate(id) { var i = 0 |