diff options
| author | 2016-10-16 15:53:08 +0200 | |
|---|---|---|
| committer | 2016-10-16 15:53:08 +0200 | |
| commit | 3f78bad3970113f14b80db19808e2c58af8fb19e (patch) | |
| tree | b8d89e5d667f99d240608a5f9d834f81e6ba2f25 /p/scripts | |
| parent | 77ceec127779cbcc3aa722693f8bfd2a73b65f7a (diff) | |
Scroll as read: keep unread function
https://github.com/FreshRSS/FreshRSS/pull/1309
Diffstat (limited to 'p/scripts')
| -rw-r--r-- | p/scripts/main.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js index 47d651d5b..138a223de 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -144,6 +144,7 @@ function mark_read(active, only_not_read) { inc--; } else if (only_not_read !== true || active.hasClass("not_read")) { active.addClass("not_read"); + active.addClass("keep_unread"); inc++; } $r.find('.icon').replaceWith(data.icon); @@ -451,7 +452,7 @@ function auto_share(key) { function scrollAsRead(box_to_follow) { var minTop = 40 + (context.current_view === 'global' ? box_to_follow.offset().top : box_to_follow.scrollTop()); - $('.not_read:visible').each(function () { + $('.not_read:not(.keep_unread):visible').each(function () { var $this = $(this); if ($this.offset().top + $this.height() < minTop) { mark_read($this, true); |
