diff options
| author | 2019-04-06 16:45:21 +0200 | |
|---|---|---|
| committer | 2019-04-06 16:45:21 +0200 | |
| commit | 43e3a2d69dc6343f3e30e7c3e3e1cb396a5650a1 (patch) | |
| tree | ab1a12cd123190291dc4aeb5b2df6cf59643cc18 /p | |
| parent | 912480fab87f41bbfb7702ed269ebc5bcce6194f (diff) | |
Fix autoremove again (#2352)
Fix https://github.com/FreshRSS/FreshRSS/pull/2349
Diffstat (limited to 'p')
| -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 286764d22..a44a22c6a 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -163,6 +163,9 @@ function incUnreadsTag(tag_id, nb) { } function removeArticle(div) { + if (!div || div.classList.contains('active') || div.classList.contains('not_read')) { + return; + } let scrollTop = box_to_follow.scrollTop; let dirty = false; const p = div.previousElementSibling, @@ -384,6 +387,9 @@ function toggleContent(new_active, old_active, skipping) { if (old_active) { old_active.classList.remove('active'); old_active.classList.remove('current'); //Split for IE11 + if (context.auto_remove_article) { + removeArticle(old_active); + } } } else { new_active.classList.toggle('active'); |
