From 14206aca160355507ae50e6337c798733e730c15 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sun, 18 Jan 2015 11:59:03 +0100 Subject: Improve behavior when mark as read / favorite fail If the request fails: - Open a notification to inform user - Remove pending index from the pending_feeds list Fix https://github.com/FreshRSS/FreshRSS/issues/751 --- p/scripts/main.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'p') diff --git a/p/scripts/main.js b/p/scripts/main.js index 9b6524b01..0561097e5 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -154,6 +154,9 @@ function mark_read(active, only_not_read) { incUnreadsFeed(active, feed_id, inc); faviconNbUnread(); + pending_feeds.splice(index_pending, 1); + }).fail(function (data) { + openNotification(i18n.notif_request_failed, 'bad'); pending_feeds.splice(index_pending, 1); }); } @@ -209,6 +212,9 @@ function mark_favorite(active) { } } + pending_feeds.splice(index_pending, 1); + }).fail(function (data) { + openNotification(i18n.notif_request_failed, 'bad'); pending_feeds.splice(index_pending, 1); }); } -- cgit v1.2.3