X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FIndexPage.java;h=e675311afb4bbfbc3f8e720da72b60db912be69d;hb=85fd1173da553ee8c1afbe0c4638cc9bbce8d44f;hp=5f4a4a44bd146bee46b5d6e203bff5611b0ac3d6;hpb=73be50df4f7b7761fe7f286f2fdb73a142c14926;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/IndexPage.java b/src/main/java/net/pterodactylus/sone/web/IndexPage.java index 5f4a4a4..e675311 100644 --- a/src/main/java/net/pterodactylus/sone/web/IndexPage.java +++ b/src/main/java/net/pterodactylus/sone/web/IndexPage.java @@ -22,7 +22,6 @@ import java.util.Collections; import java.util.List; import net.pterodactylus.sone.data.Post; -import net.pterodactylus.sone.data.Reply; import net.pterodactylus.sone.data.Sone; import net.pterodactylus.util.collection.Pagination; import net.pterodactylus.util.filter.Filters; @@ -76,18 +75,9 @@ public class IndexPage extends SoneTemplatePage { } allPosts = Filters.filteredList(allPosts, Post.FUTURE_POSTS_FILTER); Collections.sort(allPosts, Post.TIME_COMPARATOR); - Pagination pagination = new Pagination(allPosts, 25).setPage(Numbers.safeParseInteger(request.getHttpRequest().getParam("page"), 0)); + Pagination pagination = new Pagination(allPosts, webInterface.getCore().getPreferences().getPostsPerPage()).setPage(Numbers.safeParseInteger(request.getHttpRequest().getParam("page"), 0)); templateContext.set("pagination", pagination); templateContext.set("posts", pagination.getItems()); - - /* mark it all as known. */ - for (Post post : pagination.getItems()) { - webInterface.getCore().markPostKnown(post); - for (Reply reply : webInterface.getCore().getReplies(post)) { - webInterface.getCore().markReplyKnown(reply); - } - } - } }