From 9169fbafb2e07b33b2ca175c7ac4a9558280912c Mon Sep 17 00:00:00 2001 From: Dave Z Date: Sun, 26 Aug 2018 19:18:07 -0400 Subject: Show count of feeds with permanent errors in header menu Only for feeds that reach `maxParsingError` are counted (so transient errors do not trigger counter). --- ui/subscription_submit.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ui/subscription_submit.go') diff --git a/ui/subscription_submit.go b/ui/subscription_submit.go index f7a0181..fe61513 100644 --- a/ui/subscription_submit.go +++ b/ui/subscription_submit.go @@ -40,6 +40,7 @@ func (c *Controller) SubmitSubscription(w http.ResponseWriter, r *http.Request) v.Set("menu", "feeds") v.Set("user", user) v.Set("countUnread", c.store.CountUnreadEntries(user.ID)) + v.Set("countErrorFeeds", c.store.CountErrorFeeds(user.ID)) subscriptionForm := form.NewSubscriptionForm(r) if err := subscriptionForm.Validate(); err != nil { @@ -94,6 +95,7 @@ func (c *Controller) SubmitSubscription(w http.ResponseWriter, r *http.Request) v.Set("menu", "feeds") v.Set("user", user) v.Set("countUnread", c.store.CountUnreadEntries(user.ID)) + v.Set("countErrorFeeds", c.store.CountErrorFeeds(user.ID)) html.OK(w, r, v.Render("choose_subscription")) } -- cgit v1.2.3