Skip to content

Commit 1d6e5c8

Browse files
GiteaBotearl-warrenGusted
authored
fix pagination for followers and following (#27127) (#27138)
Backport #27127 by @earl-warren - 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: Earl Warren <[email protected]> Co-authored-by: Gusted <[email protected]>
1 parent 882e465 commit 1d6e5c8

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
@@ -223,10 +223,10 @@ func Profile(ctx *context.Context) {
223223
switch tab {
224224
case "followers":
225225
ctx.Data["Cards"] = followers
226-
total = int(count)
226+
total = int(numFollowers)
227227
case "following":
228228
ctx.Data["Cards"] = following
229-
total = int(count)
229+
total = int(numFollowing)
230230
case "activity":
231231
date := ctx.FormString("date")
232232
items, count, err := activities_model.GetFeeds(ctx, activities_model.GetFeedsOptions{

0 commit comments

Comments
 (0)