aboutsummaryrefslogtreecommitdiff
path: root/ui/unread_entries.go
diff options
context:
space:
mode:
authorGravatar logan <60271007+1pav@users.noreply.github.com> 2020-07-09 01:24:54 +0200
committerGravatar Frédéric Guillot <fred@miniflux.net> 2020-07-08 20:14:31 -0700
commit5f266319a3f7587dcd7c5f578224032da395eae7 (patch)
treec578f219a039f73d0ea6d7dd880e52a5f5f5f5da /ui/unread_entries.go
parente32fa059e5929151887e5c926d10f003e34039fb (diff)
downloadv2-5f266319a3f7587dcd7c5f578224032da395eae7.tar.gz
v2-5f266319a3f7587dcd7c5f578224032da395eae7.tar.zst
v2-5f266319a3f7587dcd7c5f578224032da395eae7.zip
Add option to change the number of entries per page (fixes #40)
Diffstat (limited to '')
-rw-r--r--ui/unread_entries.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/unread_entries.go b/ui/unread_entries.go
index c49fc30b..e01c941f 100644
--- a/ui/unread_entries.go
+++ b/ui/unread_entries.go
@@ -43,7 +43,7 @@ func (h *handler) showUnreadPage(w http.ResponseWriter, r *http.Request) {
builder.WithOrder(model.DefaultSortingOrder)
builder.WithDirection(user.EntryDirection)
builder.WithOffset(offset)
- builder.WithLimit(nbItemsPerPage)
+ builder.WithLimit(user.EntriesPerPage)
entries, err := builder.GetEntries()
if err != nil {
html.ServerError(w, r, err)
@@ -51,7 +51,7 @@ func (h *handler) showUnreadPage(w http.ResponseWriter, r *http.Request) {
}
view.Set("entries", entries)
- view.Set("pagination", getPagination(route.Path(h.router, "unread"), countUnread, offset))
+ view.Set("pagination", getPagination(route.Path(h.router, "unread"), countUnread, offset, user.EntriesPerPage))
view.Set("menu", "unread")
view.Set("user", user)
view.Set("countUnread", countUnread)