]> git.wh0rd.org Git - tt-rss.git/commitdiff
invalidate local cache when view mode/limit is changed
authorAndrew Dolgov <fox@bah.spb.su>
Sat, 23 Feb 2008 05:44:13 +0000 (06:44 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sat, 23 Feb 2008 05:44:13 +0000 (06:44 +0100)
tt-rss.js
tt-rss.php
viewfeed.js

index a4588c347806e6f4aa6cc34e39c93571a6cc9d28..b7a6fca18363357e4c45971d4e83dd6f1d452630 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -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, '')
 }
index 4ad0a09bc2d5ced81497f00b77ffc4243568e383..e491cc717131975c1151c70e0ecfd703be41ef67 100644 (file)
@@ -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()"');
        
                ?>              
 
index 2eef820e88182bb86f6050885c09b0e00d9c0087..79dbe003725bf674ec9a4252be4c892539569e62 100644 (file)
@@ -1508,6 +1508,10 @@ function cache_expire() {
        }
 }
 
+function cache_empty() {
+       article_cache = new Array();
+}
+
 function cache_invalidate(id) {
        var i = 0