diff options
| author | 2017-03-29 21:42:40 +0200 | |
|---|---|---|
| committer | 2017-03-29 21:42:40 +0200 | |
| commit | 0d4c26c673d548a1367a0f96f49546ca27619d90 (patch) | |
| tree | 1f7ca161eb586220199906c66da6360062c3fca4 /p | |
| parent | 6c604bc1dd75cc67392ff37186855faea3c29d48 (diff) | |
Add manual commit & refresh cache to deferred insertion
Diffstat (limited to 'p')
| -rw-r--r-- | p/scripts/main.js | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js index c2f60bf7f..9aca75b93 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -803,13 +803,12 @@ function updateFeed(feeds, feeds_count) { if (!feed) { return; } - $.ajax({ type: 'POST', url: feed.url, data : { _csrf: context.csrf, - isLastFeed: feeds.length <= 0 ? 1 : 0, + noCommit: feeds.length > 0 ? 1 : 0, }, }).always(function (data) { feed_processed++; @@ -831,7 +830,6 @@ function init_actualize() { if (ajax_loading) { return false; } - ajax_loading = true; $.getJSON('./?c=javascript&a=actualize').done(function (data) { @@ -842,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 |
