mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Make branches list page operations remember current page (#23420)
Close #23411 Always pass "page" query parameter to backend, and make backend respect it. The `ctx.FormInt("limit")` is never used, so removed. --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
		@@ -18,10 +18,11 @@ type Pagination struct {
 | 
			
		||||
	urlParams []string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NewPagination creates a new instance of the Pagination struct
 | 
			
		||||
func NewPagination(total, page, issueNum, numPages int) *Pagination {
 | 
			
		||||
// NewPagination creates a new instance of the Pagination struct.
 | 
			
		||||
// "pagingNum" is "page size" or "limit", "current" is "page"
 | 
			
		||||
func NewPagination(total, pagingNum, current, numPages int) *Pagination {
 | 
			
		||||
	p := &Pagination{}
 | 
			
		||||
	p.Paginater = paginator.New(total, page, issueNum, numPages)
 | 
			
		||||
	p.Paginater = paginator.New(total, pagingNum, current, numPages)
 | 
			
		||||
	return p
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user