From df0e57f4cc696880fe23596630447c289015b45b Mon Sep 17 00:00:00 2001 From: Asaf Gartner Date: Sat, 6 Jul 2024 12:01:08 +0300 Subject: [PATCH] Limit number of timeline items with SQL --- src/website/projects.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/website/projects.go b/src/website/projects.go index 64501267..f97577d0 100644 --- a/src/website/projects.go +++ b/src/website/projects.go @@ -308,13 +308,12 @@ func ProjectHomepage(c *RequestContext) ResponseData { templateData.RecentActivity, err = FetchTimeline(c, c.Conn, c.CurrentUser, lineageBuilder, hmndata.TimelineQuery{ ProjectIDs: []int{c.CurrentProject.ID}, + Limit: maxRecentActivity, }) if err != nil { return c.ErrorResponse(http.StatusInternalServerError, err) } - templateData.RecentActivity = utils.ClampSlice(templateData.RecentActivity, maxRecentActivity) - followUrl := "" following := false if c.CurrentUser != nil {