From 6bd3f682f485329b41d4f2ccb9031aff2a02549e Mon Sep 17 00:00:00 2001 From: Asaf Gartner Date: Mon, 8 Jul 2024 14:07:02 +0300 Subject: [PATCH] Reduced number of news posts on landing page --- src/website/landing.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/website/landing.go b/src/website/landing.go index 32a767d0..20f63718 100644 --- a/src/website/landing.go +++ b/src/website/landing.go @@ -14,7 +14,8 @@ import ( ) func Index(c *RequestContext) ResponseData { - const maxPostsPerTab = 60 + const maxPostsPerTab = 50 + const maxNewsPosts = 10 c.Perf.StartBlock("SQL", "Fetch subforum tree") subforumTree := models.GetFullSubforumTree(c, c.Conn) @@ -107,7 +108,7 @@ func Index(c *RequestContext) ResponseData { newsThreads, err := hmndata.FetchThreads(c, c.Conn, c.CurrentUser, hmndata.ThreadsQuery{ ProjectIDs: []int{models.HMNProjectID}, ThreadTypes: []models.ThreadType{models.ThreadTypeProjectBlogPost}, - Limit: maxPostsPerTab, + Limit: maxNewsPosts, OrderByCreated: true, }) if err != nil {