Skip to content

Commit fc09c30

Browse files
earl-warrenGusted
andauthored
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 c1a1363) Co-authored-by: Gusted <[email protected]>
1 parent f7c6497 commit fc09c30

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routers/web/user/profile.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,10 @@ func prepareUserProfileTabData(ctx *context.Context, showPrivate bool, profileGi
157157
switch tab {
158158
case "followers":
159159
ctx.Data["Cards"] = followers
160-
total = int(count)
160+
total = int(numFollowers)
161161
case "following":
162162
ctx.Data["Cards"] = following
163-
total = int(count)
163+
total = int(numFollowing)
164164
case "activity":
165165
date := ctx.FormString("date")
166166
pagingNum = setting.UI.FeedPagingNum

0 commit comments

Comments
 (0)