From 15727f716a83c1671b85a18aef723d99ca633cda Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 24 Jan 2020 09:10:47 +0100 Subject: Redirect to /unread when getting a 404 for an unread expired entry Hosted miniflux don't keep read entries for long. If I leave my PC at home on an unread entry, read everything pending at work and get back to home later, when I click "next", I get a bare 404 error. I have to go back to /unread myself. I think it would be more user friendly (but maybe a bit suprising) to go directly to /unread in this case. --- ui/entry_unread.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/entry_unread.go b/ui/entry_unread.go index fb8d45c..414b8e8 100644 --- a/ui/entry_unread.go +++ b/ui/entry_unread.go @@ -35,7 +35,7 @@ func (h *handler) showUnreadEntryPage(w http.ResponseWriter, r *http.Request) { } if entry == nil { - html.NotFound(w, r) + html.Redirect(w, r, route.Path(h.router, "unread")) return } -- cgit v1.2.3