aboutsummaryrefslogtreecommitdiff
path: root/p
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-04-01 11:32:24 +0200
committerGravatar GitHub <noreply@github.com> 2017-04-01 11:32:24 +0200
commitf98cd52a02eb1e2d17b46ef9fddf327b0ebd55e2 (patch)
tree85b8e7a60922781ea898c57f649e97b3640f3d31 /p
parentf2b4bfc67da9eba8ca45a02860e6f6a58a13d927 (diff)
parent8acdf273b2f832ed07bbc5f630c068c9fe73cbe0 (diff)
Merge pull request #1470 from Alkarex/defered-insertion
Implementation of defered insertion
Diffstat (limited to 'p')
-rw-r--r--p/scripts/main.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js
index 5dbb95c91..9aca75b93 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -803,12 +803,12 @@ function updateFeed(feeds, feeds_count) {
if (!feed) {
return;
}
-
$.ajax({
type: 'POST',
url: feed.url,
data : {
_csrf: context.csrf,
+ noCommit: feeds.length > 0 ? 1 : 0,
},
}).always(function (data) {
feed_processed++;
@@ -830,7 +830,6 @@ function init_actualize() {
if (ajax_loading) {
return false;
}
-
ajax_loading = true;
$.getJSON('./?c=javascript&a=actualize').done(function (data) {
@@ -841,7 +840,16 @@ function init_actualize() {
}
if (data.feeds.length === 0) {
openNotification(data.feedback_no_refresh, "good");
- ajax_loading = false;
+ $.ajax({ //Empty request to force refresh server database cache
+ type: 'POST',
+ url: './?c=feed&a=actualize&id=-1',
+ data : {
+ _csrf: context.csrf,
+ noCommit: 0,
+ },
+ }).always(function (data) {
+ ajax_loading = false;
+ });
return;
}
//Progress bar