mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
Rewrite individual entry pagination SQL queries
This commit is contained in:
parent
bd70640794
commit
c5373ff2bf
10 changed files with 211 additions and 73 deletions
|
@ -13,6 +13,7 @@ import (
|
|||
"github.com/miniflux/miniflux/http/route"
|
||||
"github.com/miniflux/miniflux/logger"
|
||||
"github.com/miniflux/miniflux/model"
|
||||
"github.com/miniflux/miniflux/storage"
|
||||
"github.com/miniflux/miniflux/ui/session"
|
||||
"github.com/miniflux/miniflux/ui/view"
|
||||
)
|
||||
|
@ -64,10 +65,9 @@ func (c *Controller) ShowFeedEntry(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
}
|
||||
|
||||
builder = c.store.NewEntryQueryBuilder(user.ID)
|
||||
builder.WithFeedID(feedID)
|
||||
|
||||
prevEntry, nextEntry, err := c.getEntryPrevNext(user, builder, entry.ID)
|
||||
entryPaginationBuilder := storage.NewEntryPaginationBuilder(c.store, user.ID, entry.ID, user.EntryDirection)
|
||||
entryPaginationBuilder.WithFeedID(feedID)
|
||||
prevEntry, nextEntry, err := entryPaginationBuilder.Entries()
|
||||
if err != nil {
|
||||
html.ServerError(w, err)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue