mirror of
https://github.com/go-gitea/gitea
synced 2025-07-09 20:17:21 +00: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:
@ -76,9 +76,7 @@ func TestPaginator(t *testing.T) {
|
||||
t.Run("Only current page", func(t *testing.T) {
|
||||
p := New(0, 10, 1, 1)
|
||||
pages := p.Pages()
|
||||
assert.Len(t, pages, 1)
|
||||
assert.Equal(t, 1, pages[0].Num())
|
||||
assert.True(t, pages[0].IsCurrent())
|
||||
assert.Empty(t, pages) // no "total", so no pages
|
||||
|
||||
p = New(1, 10, 1, 1)
|
||||
pages = p.Pages()
|
||||
|
Reference in New Issue
Block a user