From 85018d41dd303fe068086cca5ee3b81a75c4edd9 Mon Sep 17 00:00:00 2001 From: Gusted Date: Mon, 18 Sep 2023 22:52:00 +0200 Subject: [PATCH] fix pagination for followers and following - 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) --- 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 71d10ab4c1251..380a681b9d7ed 100644 --- a/routers/web/user/profile.go +++ b/routers/web/user/profile.go @@ -157,10 +157,10 @@ func prepareUserProfileTabData(ctx *context.Context, showPrivate bool, profileGi 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") pagingNum = setting.UI.FeedPagingNum