mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-15 16:55:57 +00:00
invalidate article cache when editing tags
This commit is contained in:
@@ -2,6 +2,14 @@ var hotkeys_enabled = true;
|
|||||||
var debug_mode_enabled = false;
|
var debug_mode_enabled = false;
|
||||||
var xmlhttp_rpc = Ajax.getTransport();
|
var xmlhttp_rpc = Ajax.getTransport();
|
||||||
|
|
||||||
|
/* add method to remove element from array */
|
||||||
|
|
||||||
|
Array.prototype.remove = function(s) {
|
||||||
|
for (var i=0; i < this.length; i++) {
|
||||||
|
if (s == this[i]) this.splice(i, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function browser_has_opacity() {
|
function browser_has_opacity() {
|
||||||
return navigator.userAgent.match("Gecko") != null ||
|
return navigator.userAgent.match("Gecko") != null ||
|
||||||
navigator.userAgent.match("Opera") != null;
|
navigator.userAgent.match("Opera") != null;
|
||||||
|
|||||||
16
viewfeed.js
16
viewfeed.js
@@ -633,6 +633,9 @@ function editArticleTags(id, feed_id, cdm_enabled) {
|
|||||||
_tag_active_post_id = id;
|
_tag_active_post_id = id;
|
||||||
_tag_active_feed_id = feed_id;
|
_tag_active_feed_id = feed_id;
|
||||||
_tag_active_cdm = cdm_enabled;
|
_tag_active_cdm = cdm_enabled;
|
||||||
|
|
||||||
|
cache_invalidate(id);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
_tag_cdm_scroll = document.getElementById("headlinesInnerContainer").scrollTop;
|
_tag_cdm_scroll = document.getElementById("headlinesInnerContainer").scrollTop;
|
||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
@@ -829,3 +832,16 @@ function cache_expire() {
|
|||||||
article_cache.shift();
|
article_cache.shift();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function cache_invalidate(id) {
|
||||||
|
var i = 0
|
||||||
|
|
||||||
|
while (i < article_cache.length) {
|
||||||
|
if (article_cache[i]["id"] == id) {
|
||||||
|
article_cache.remove(i);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user