Browse Source

cdmScrollToArticle: set id as active if selected

Andrew Dolgov 4 months ago
parent
commit
137bc3b3db
1 changed files with 4 additions and 0 deletions
  1. 4 0
      js/viewfeed.js

+ 4 - 0
js/viewfeed.js

@@ -455,6 +455,8 @@ function moveToPost(mode, noscroll, noexpand) {
 	}
 
 	if (!getActiveArticleId()) {
+		console.log('hurr', rows[0]);
+
 		next_id = rows[0];
 		prev_id = rows[rows.length-1]
 	} else {
@@ -983,6 +985,8 @@ function cdmScrollToArticleId(id, force) {
 		// expanded cdm has a 4px margin now
 		ctr.scrollTop = parseInt(e.offsetTop) - 4;
 
+		setActiveArticleId(id);
+
 		// article is selected manually, set it read
 		toggleUnread(id, 0);1
 	}