From 437e7f9152ba0f10b5e43b61d183f766de1fb16d Mon Sep 17 00:00:00 2001 From: serenity <98162476+NekoDrone@users.noreply.github.com> Date: Fri, 5 Sep 2025 02:40:57 +0800 Subject: [PATCH] appview/state: fix timeline out of bounds Signed-off-by: serenity <98162476+NekoDrone@users.noreply.github.com> --- appview/state/state.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/appview/state/state.go b/appview/state/state.go index c41539f..f3a8fa5 100644 --- a/appview/state/state.go +++ b/appview/state/state.go @@ -224,7 +224,7 @@ func (s *State) Timeline(w http.ResponseWriter, r *http.Request) { } func (s *State) Home(w http.ResponseWriter, r *http.Request) { - timeline, err := db.MakeTimeline(s.db, 15) + timeline, err := db.MakeTimeline(s.db, 5) if err != nil { log.Println(err) s.pages.Notice(w, "timeline", "Uh oh! Failed to load timeline.") @@ -238,8 +238,6 @@ func (s *State) Home(w http.ResponseWriter, r *http.Request) { return } - timeline = timeline[:5] - s.pages.Home(w, pages.TimelineParams{ LoggedInUser: nil, Timeline: timeline, -- 2.43.0