mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Only use prev and next buttons for pagination on user dashboard (#33981)
The pagination on the user dashboard sounds unnecessary, this will change it to a prev/next buttons. For instances with around `10 million` records in the action table, this option affects how the user dashboard is loaded on first visit. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
		| @@ -137,11 +137,10 @@ func Dashboard(ctx *context.Context) { | ||||
| 		return | ||||
| 	} | ||||
|  | ||||
| 	ctx.Data["Feeds"] = feeds | ||||
|  | ||||
| 	pager := context.NewPagination(int(count), setting.UI.FeedPagingNum, page, 5) | ||||
| 	pager := context.NewPagination(count, setting.UI.FeedPagingNum, page, 5).WithCurRows(len(feeds)) | ||||
| 	pager.AddParamFromRequest(ctx.Req) | ||||
| 	ctx.Data["Page"] = pager | ||||
| 	ctx.Data["Feeds"] = feeds | ||||
|  | ||||
| 	ctx.HTML(http.StatusOK, tplDashboard) | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user