mirror of
https://github.com/gogs/gogs.git
synced 2025-12-20 23:30:00 +01:00
commits: able to specify pageSize dynamically (#3965)
Usage: <url>?page={page}&pageSize={pageSize}
Also avoid/removed getting total commits count for pagination,
users are only allowed navigation by 'newer' and 'older'.
This commit is contained in:
6
vendor/github.com/gogits/git-module/commit.go
generated
vendored
6
vendor/github.com/gogits/git-module/commit.go
generated
vendored
@@ -170,8 +170,12 @@ func (c *Commit) CommitsCount() (int64, error) {
|
||||
return CommitsCount(c.repo.Path, c.ID.String())
|
||||
}
|
||||
|
||||
func (c *Commit) CommitsByRangeSize(page, size int) (*list.List, error) {
|
||||
return c.repo.CommitsByRangeSize(c.ID.String(), page, size)
|
||||
}
|
||||
|
||||
func (c *Commit) CommitsByRange(page int) (*list.List, error) {
|
||||
return c.repo.commitsByRange(c.ID, page)
|
||||
return c.repo.CommitsByRange(c.ID.String(), page)
|
||||
}
|
||||
|
||||
func (c *Commit) CommitsBefore() (*list.List, error) {
|
||||
|
||||
Reference in New Issue
Block a user