diff options
author | Earl Warren <109468362+earl-warren@users.noreply.github.com> | 2023-09-19 17:24:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-19 15:24:54 +0000 |
commit | fc09c30081d3e28e60e94cd3b24c7bac887887b3 (patch) | |
tree | ba065deb08e95871622fdfac5d92efecf9be7f92 /routers | |
parent | f7c64976d597f73ce7448d04099e5afc0d66e9f0 (diff) | |
download | gitea-fc09c30081d3e28e60e94cd3b24c7bac887887b3.tar.gz gitea-fc09c30081d3e28e60e94cd3b24c7bac887887b3.zip |
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 <postmaster@gusted.xyz>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/user/profile.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/web/user/profile.go b/routers/web/user/profile.go index 71d10ab4c1..380a681b9d 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 |