1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

Allow to switch between unread only and all entries on category/feed views

This commit is contained in:
Diego Agulló 2018-12-14 09:54:25 +01:00 committed by Frédéric Guillot
parent 012138179c
commit cf25efb4d9
16 changed files with 227 additions and 15 deletions

View file

@ -37,7 +37,7 @@ func (h *handler) showFeedEntriesPage(w http.ResponseWriter, r *http.Request) {
offset := request.QueryIntParam(r, "offset", 0)
builder := h.store.NewEntryQueryBuilder(user.ID)
builder.WithFeedID(feed.ID)
builder.WithoutStatus(model.EntryStatusRemoved)
builder.WithStatus(model.EntryStatusUnread)
builder.WithOrder(model.DefaultSortingOrder)
builder.WithDirection(user.EntryDirection)
builder.WithOffset(offset)
@ -66,6 +66,7 @@ func (h *handler) showFeedEntriesPage(w http.ResponseWriter, r *http.Request) {
view.Set("countUnread", h.store.CountUnreadEntries(user.ID))
view.Set("countErrorFeeds", h.store.CountErrorFeeds(user.ID))
view.Set("hasSaveEntry", h.store.HasSaveEntry(user.ID))
view.Set("showOnlyUnreadEntries", true)
html.OK(w, r, view.Render("feed_entries"))
}