From 43ccaf52af1ddaf847ed0fc4969418e6480dc18b Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Wed, 12 Dec 2018 21:31:50 -0800 Subject: Preserve category selection when no feed is found --- template/html/add_subscription.html | 2 +- template/views.go | 4 ++-- ui/subscription_add.go | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/template/html/add_subscription.html b/template/html/add_subscription.html index 2ebbca6..4a6fe7d 100644 --- a/template/html/add_subscription.html +++ b/template/html/add_subscription.html @@ -32,7 +32,7 @@ diff --git a/template/views.go b/template/views.go index 2662b9a..76fab8a 100644 --- a/template/views.go +++ b/template/views.go @@ -78,7 +78,7 @@ var templateViewsMap = map[string]string{ @@ -1382,7 +1382,7 @@ var templateViewsMap = map[string]string{ var templateViewsMapChecksums = map[string]string{ "about": "844e3313c33ae31a74b904f6ef5d60299773620d8450da6f760f9f317217c51e", - "add_subscription": "6eb055f887abffe9ddeb8977ae380c2cb1cc61767e85ed2026ef2fb5995e12d3", + "add_subscription": "a0f1d2bc02b6adc83dbeae593f74d9b936102cd6dd73302cdbec2137cafdcdd9", "bookmark_entries": "609f4b2342152fe495a219a32f17a4528b01807d61f53cee0cbebf728be73c42", "categories": "642ee3cddbd825ee6ab5a77caa0d371096b55de0f1bd4ae3055b8c8a70507d8d", "category_entries": "a803570ba91268646b2c55cffc8a3f2f162388a73bc007dd9ab61e144faa359b", diff --git a/ui/subscription_add.go b/ui/subscription_add.go index db539c8..7cb201a 100644 --- a/ui/subscription_add.go +++ b/ui/subscription_add.go @@ -10,6 +10,7 @@ import ( "miniflux.app/http/client" "miniflux.app/http/response/html" "miniflux.app/http/request" + "miniflux.app/ui/form" "miniflux.app/ui/session" "miniflux.app/ui/view" ) @@ -36,6 +37,7 @@ func (h *handler) showAddSubscriptionPage(w http.ResponseWriter, r *http.Request view.Set("countUnread", h.store.CountUnreadEntries(user.ID)) view.Set("countErrorFeeds", h.store.CountErrorFeeds(user.ID)) view.Set("defaultUserAgent", client.DefaultUserAgent) + view.Set("form", &form.SubscriptionForm{CategoryID: 0}) html.OK(w, r, view.Render("add_subscription")) } -- cgit v1.2.3