1
0
Fork 0
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:
logan 2020-07-09 01:24:54 +02:00 committed by Frédéric Guillot
parent e32fa059e5
commit 5f266319a3
35 changed files with 174 additions and 52 deletions

View file

@ -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