diff options
| author | 2014-01-25 16:37:02 +0100 | |
|---|---|---|
| committer | 2014-01-25 16:37:14 +0100 | |
| commit | fbf48f5861b18714986b7fba1dc57642ba29a8b5 (patch) | |
| tree | 904abdbf8a8737575c1bd32b8f3391da3be36f5b | |
| parent | 52711021823308748edb21d5ba0e14406ab21888 (diff) | |
Bug articles disponibles
https://github.com/marienfressinaud/FreshRSS/issues/379
| -rw-r--r-- | p/scripts/main.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js index 93e0c53b3..d891299a8 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -62,7 +62,8 @@ function incUnreadsFeed(article, feed_id, nb) { var isCurrentView = false; //Update unread: title document.title = document.title.replace(/((?: \(\d+\))?)( ยท .*?)((?: \(\d+\))?)$/, function (m, p1, p2, p3) { - if (article || ($('#' + feed_id).closest('.active').length > 0)) { + var $feed = $('#' + feed_id); + if (article || ($feed.closest('.active').length > 0 && $feed.siblings('.active').length === 0)) { isCurrentView = true; return incLabel(p1, nb) + p2 + incLabel(p3, feed_priority > 0 ? nb : 0); } else { @@ -522,11 +523,12 @@ function init_notifications() { function refreshUnreads() { $.getJSON('./?c=javascript&a=nbUnreadsPerFeed').done(function (data) { + var isAll = $('.category.all > .active').length > 0; $.each(data, function(feed_id, nbUnreads) { feed_id = 'f_' + feed_id; var elem = $('#' + feed_id + '>.feed').get(0), feed_unreads = elem ? (parseInt(elem.getAttribute('data-unread'), 10) || 0) : 0; - if (incUnreadsFeed(null, feed_id, nbUnreads - feed_unreads) && //Update of current view? + if ((incUnreadsFeed(null, feed_id, nbUnreads - feed_unreads) || isAll) && //Update of current view? (nbUnreads - feed_unreads > 0)) { $('#new-article').show(); }; |
