mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-08 14:03:24 +09:00
refactor: pagination/pager (#39162)
This commit is contained in:
@@ -312,12 +312,11 @@ func prepareUserProfileTabData(ctx *context.Context, profileDbRepo *repo_model.R
|
||||
return
|
||||
}
|
||||
|
||||
pager := context.NewPagination(total, pagingNum, page, 5)
|
||||
pager := context.NewPagerBuilder(ctx).TotalCount(total).PerPageLimit(pagingNum).CurPage(page).Build()
|
||||
if tab == "activity" {
|
||||
// FIXME: UNLIMITE-PAGING-ONE-MORE-ROW: see another comment
|
||||
pager.WithUnlimitedPaging(curRows, curRows == pagingNum)
|
||||
}
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user