Browse Source

cdmScrollToArticle: set article read on selection

Andrew Dolgov 1 year ago
parent
commit
08bee97858
1 changed files with 3 additions and 2 deletions
  1. 3 2
      js/viewfeed.js

+ 3 - 2
js/viewfeed.js

@@ -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
 	}
 }