1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-27 17:28:38 +00:00

Add setting for swipe gesture on entries on mobile

This commit is contained in:
Philipp Rempe 2020-09-27 16:41:04 +02:00 committed by Frédéric Guillot
parent ded70cd250
commit 7da72cf89a
28 changed files with 94 additions and 46 deletions

View file

@ -25,6 +25,7 @@ type SettingsForm struct {
KeyboardShortcuts bool
ShowReadingTime bool
CustomCSS string
EntrySwipe bool
}
// Merge updates the fields of the given user.
@ -38,6 +39,7 @@ func (s *SettingsForm) Merge(user *model.User) *model.User {
user.KeyboardShortcuts = s.KeyboardShortcuts
user.ShowReadingTime = s.ShowReadingTime
user.Extra["custom_css"] = s.CustomCSS
user.EntrySwipe = s.EntrySwipe;
if s.Password != "" {
user.Password = s.Password
@ -92,5 +94,6 @@ func NewSettingsForm(r *http.Request) *SettingsForm {
KeyboardShortcuts: r.FormValue("keyboard_shortcuts") == "1",
ShowReadingTime: r.FormValue("show_reading_time") == "1",
CustomCSS: r.FormValue("custom_css"),
EntrySwipe: r.FormValue("entry_swipe") == "1",
}
}