From ee42464605581c1a1c62d8fac4290144d906d3a2 Mon Sep 17 00:00:00 2001 From: Earl Warren <109468362+earl-warren@users.noreply.github.com> Date: Tue, 19 Sep 2023 17:24:54 +0200 Subject: [PATCH] fix pagination for followers and following (#27127) - Use the correct total amount for pagination. Thereby correctly show the pagination bare when there's more than one page of followers/followings. Refs: https://codeberg.org/forgejo/forgejo/pulls/1477 (cherry picked from commit c1a136318be3bf72511bed108f2d67f2cf34e1b8) Co-authored-by: Gusted --- routers/web/user/profile.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/web/user/profile.go b/routers/web/user/profile.go index a2f8d797be0f8..c6d632f2ea6d3 100644 --- a/routers/web/user/profile.go +++ b/routers/web/user/profile.go @@ -223,10 +223,10 @@ func Profile(ctx *context.Context) { switch tab { case "followers": ctx.Data["Cards"] = followers - total = int(count) + total = int(numFollowers) case "following": ctx.Data["Cards"] = following - total = int(count) + total = int(numFollowing) case "activity": date := ctx.FormString("date") items, count, err := activities_model.GetFeeds(ctx, activities_model.GetFeedsOptions{