Skip to content

Commit

Permalink
fix pagination for followers and following (#27127) (#27138)
Browse files Browse the repository at this point in the history
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 <109468362+earl-warren@users.noreply.github.com>
Co-authored-by: Gusted <postmaster@gusted.xyz>
  • Loading branch information
3 people committed Sep 19, 2023
1 parent 882e465 commit 1d6e5c8
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 @@ -223,10 +223,10 @@ func Profile(ctx *context.Context) {
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")
items, count, err := activities_model.GetFeeds(ctx, activities_model.GetFeedsOptions{
Expand Down

0 comments on commit 1d6e5c8

Please sign in to comment.