mirror of
https://github.com/miniflux/v2.git
synced 2025-08-06 17:41:00 +00:00
fix(ui): reading preferences are reset if the form values are incorrect
This commit is contained in:
parent
6cbe8c3a9d
commit
f5fde36d45
4 changed files with 16 additions and 11 deletions
|
@ -43,6 +43,12 @@ func (h *handler) updateSettings(w http.ResponseWriter, r *http.Request) {
|
|||
sess := session.New(h.store, request.SessionID(r))
|
||||
view := view.New(h.tpl, r, sess)
|
||||
view.Set("form", settingsForm)
|
||||
view.Set("readBehaviors", map[string]any{
|
||||
"NoAutoMarkAsRead": form.NoAutoMarkAsRead,
|
||||
"MarkAsReadOnView": form.MarkAsReadOnView,
|
||||
"MarkAsReadOnViewButWaitForPlayerCompletion": form.MarkAsReadOnViewButWaitForPlayerCompletion,
|
||||
"MarkAsReadOnlyOnPlayerCompletion": form.MarkAsReadOnlyOnPlayerCompletion,
|
||||
})
|
||||
view.Set("themes", model.Themes())
|
||||
view.Set("languages", locale.AvailableLanguages)
|
||||
view.Set("timezones", timezones)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue