4
0
Эх сурвалжийг харах

Autoload when less than 2 remaining articles

https://github.com/marienfressinaud/FreshRSS/issues/388
+ Simplify code
Alexandre Alapetite 12 жил өмнө
parent
commit
c3cac60b31
1 өөрчлөгдсөн 2 нэмэгдсэн , 5 устгасан
  1. 2 5
      p/scripts/main.js

+ 2 - 5
p/scripts/main.js

@@ -278,11 +278,8 @@ function next_entry() {
 		new_active = old_active.length === 0 ? $(".flux:first") : old_active.nextAll(".flux:first");
 	toggleContent(new_active, old_active);
 
-	if (!auto_load_more) {
-		var last_active = $(".flux:last");
-		if (last_active.attr("id") === new_active.attr("id")) {
-			load_more_posts();
-		}
+	if (new_active.nextAll().length < 3) {
+		load_more_posts();
 	}
 }