aboutsummaryrefslogtreecommitdiff
path: root/internal/ui/ui.go
diff options
context:
space:
mode:
authorGravatar Ryan Stafford <ryan@nanorex.net> 2024-01-10 00:44:25 -0500
committerGravatar GitHub <noreply@github.com> 2024-01-09 21:44:25 -0800
commit980c5c63df39b6dd491f994eb72f2ff796d7823a (patch)
treed8d08e958f390963c8a7ca779ffcc741c3040354 /internal/ui/ui.go
parent1441dc76006c30ff962c3d44ff2fecdd911dec4e (diff)
downloadv2-980c5c63df39b6dd491f994eb72f2ff796d7823a.tar.gz
v2-980c5c63df39b6dd491f994eb72f2ff796d7823a.tar.zst
v2-980c5c63df39b6dd491f994eb72f2ff796d7823a.zip
Limit feed/category entry pagination to unread entries when coming from unread entry list
Diffstat (limited to 'internal/ui/ui.go')
-rw-r--r--internal/ui/ui.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/ui/ui.go b/internal/ui/ui.go
index f95d6ebf..0393d33b 100644
--- a/internal/ui/ui.go
+++ b/internal/ui/ui.go
@@ -73,11 +73,13 @@ func Serve(router *mux.Router, store *storage.Storage, pool *worker.Pool) {
uiRouter.HandleFunc("/feed/{feedID}/entries", handler.showFeedEntriesPage).Name("feedEntries").Methods(http.MethodGet)
uiRouter.HandleFunc("/feed/{feedID}/entries/all", handler.showFeedEntriesAllPage).Name("feedEntriesAll").Methods(http.MethodGet)
uiRouter.HandleFunc("/feed/{feedID}/entry/{entryID}", handler.showFeedEntryPage).Name("feedEntry").Methods(http.MethodGet)
+ uiRouter.HandleFunc("/unread/feed/{feedID}/entry/{entryID}", handler.showUnreadFeedEntryPage).Name("unreadFeedEntry").Methods(http.MethodGet)
uiRouter.HandleFunc("/feed/icon/{iconID}", handler.showIcon).Name("icon").Methods(http.MethodGet)
uiRouter.HandleFunc("/feed/{feedID}/mark-all-as-read", handler.markFeedAsRead).Name("markFeedAsRead").Methods(http.MethodPost)
// Category pages.
uiRouter.HandleFunc("/category/{categoryID}/entry/{entryID}", handler.showCategoryEntryPage).Name("categoryEntry").Methods(http.MethodGet)
+ uiRouter.HandleFunc("/unread/category/{categoryID}/entry/{entryID}", handler.showUnreadCategoryEntryPage).Name("unreadCategoryEntry").Methods(http.MethodGet)
uiRouter.HandleFunc("/categories", handler.showCategoryListPage).Name("categories").Methods(http.MethodGet)
uiRouter.HandleFunc("/category/create", handler.showCreateCategoryPage).Name("createCategory").Methods(http.MethodGet)
uiRouter.HandleFunc("/category/save", handler.saveCategory).Name("saveCategory").Methods(http.MethodPost)