Skip to content

Commit

Permalink
fix pagination for followers and following (#27127)
Browse files Browse the repository at this point in the history
- 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 c1a1363)

Co-authored-by: Gusted <postmaster@gusted.xyz>
  • Loading branch information
earl-warren and Gusted authored Sep 19, 2023
1 parent f7c6497 commit fc09c30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routers/web/user/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fc09c30

Please sign in to comment.