aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Vincent Bernat <vincent@bernat.ch>2020-01-24 09:10:47 +0100
committerGravatar Frédéric Guillot <fred@miniflux.net>2020-01-24 20:27:50 -0800
commit15727f716a83c1671b85a18aef723d99ca633cda (patch)
tree75a5e35ca0c2244d56f0c6e83f89e9b31cedb123
parent476898b1d4371ecd5bec407592a8b08b90963cab (diff)
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.
-rw-r--r--ui/entry_unread.go2
1 files changed, 1 insertions, 1 deletions
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
}