mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
Add option to change the number of entries per page (fixes #40)
This commit is contained in:
parent
e32fa059e5
commit
5f266319a3
35 changed files with 174 additions and 52 deletions
|
@ -4,10 +4,6 @@
|
|||
|
||||
package ui // import "miniflux.app/ui"
|
||||
|
||||
const (
|
||||
nbItemsPerPage = 100
|
||||
)
|
||||
|
||||
type pagination struct {
|
||||
Route string
|
||||
Total int
|
||||
|
@ -20,7 +16,7 @@ type pagination struct {
|
|||
SearchQuery string
|
||||
}
|
||||
|
||||
func getPagination(route string, total, offset int) pagination {
|
||||
func getPagination(route string, total, offset, nbItemsPerPage int) pagination {
|
||||
nextOffset := 0
|
||||
prevOffset := 0
|
||||
showNext := (total - offset) > nbItemsPerPage
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue