]> git.wh0rd.org Git - tt-rss.git/commitdiff
cdmScrollToArticle: set article read on selection
authorAndrew Dolgov <noreply@fakecake.org>
Fri, 30 Nov 2018 17:00:27 +0000 (20:00 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Fri, 30 Nov 2018 17:00:27 +0000 (20:00 +0300)
js/viewfeed.js

index efb906cb68479e95bc65c97566e00156e3cd0aa8..373aa7dd08b4ce093f3c3f89f4acca1f9eabff27 100755 (executable)
@@ -491,7 +491,6 @@ function moveToPost(mode, noscroll, noexpand) {
 
                                } else if (next_id) {
                                        cdmScrollToArticleId(next_id, true);
-                                       toggleUnread(next_id, 0);
                                }
 
                        } else if (next_id) {
@@ -516,7 +515,6 @@ function moveToPost(mode, noscroll, noexpand) {
                                        scrollArticle(-ctr.offsetHeight/4);
                                } else if (prev_id) {
                                        cdmScrollToArticleId(prev_id, noscroll);
-                                       toggleUnread(next_id, 0);1
                                }
 
                        } else if (prev_id) {
@@ -984,6 +982,9 @@ function cdmScrollToArticleId(id, force) {
 
                // expanded cdm has a 4px margin now
                ctr.scrollTop = parseInt(e.offsetTop) - 4;
+
+               // article is selected manually, set it read
+               toggleUnread(id, 0);1
        }
 }