diff options
| author | 2015-01-18 11:59:03 +0100 | |
|---|---|---|
| committer | 2015-01-18 11:59:03 +0100 | |
| commit | 14206aca160355507ae50e6337c798733e730c15 (patch) | |
| tree | e3c3e567e041280ec74502989c50dcaddf638184 /p/scripts | |
| parent | d91a92434f516a9e25bf0dca608a0221094d0489 (diff) | |
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
Diffstat (limited to 'p/scripts')
| -rw-r--r-- | p/scripts/main.js | 6 |
1 files changed, 6 insertions, 0 deletions
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 @@ -155,6 +155,9 @@ function mark_read(active, only_not_read) { faviconNbUnread(); pending_feeds.splice(index_pending, 1); + }).fail(function (data) { + openNotification(i18n.notif_request_failed, 'bad'); + pending_feeds.splice(index_pending, 1); }); } @@ -210,6 +213,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); }); } |
