mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Add user setting for marking entry as read on view
This commit is contained in:
parent
6046a74a64
commit
356d32c6fe
35 changed files with 84 additions and 29 deletions
|
@ -34,6 +34,7 @@ type User struct {
|
|||
CJKReadingSpeed int `json:"cjk_reading_speed"`
|
||||
DefaultHomePage string `json:"default_home_page"`
|
||||
CategoriesSortingOrder string `json:"categories_sorting_order"`
|
||||
MarkReadOnView bool `json:"mark_read_on_view"`
|
||||
}
|
||||
|
||||
// UserCreationRequest represents the request to create a user.
|
||||
|
@ -68,6 +69,7 @@ type UserModificationRequest struct {
|
|||
CJKReadingSpeed *int `json:"cjk_reading_speed"`
|
||||
DefaultHomePage *string `json:"default_home_page"`
|
||||
CategoriesSortingOrder *string `json:"categories_sorting_order"`
|
||||
MarkReadOnView *bool `json:"mark_read_on_view"`
|
||||
}
|
||||
|
||||
// Patch updates the User object with the modification request.
|
||||
|
@ -155,6 +157,10 @@ func (u *UserModificationRequest) Patch(user *User) {
|
|||
if u.CategoriesSortingOrder != nil {
|
||||
user.CategoriesSortingOrder = *u.CategoriesSortingOrder
|
||||
}
|
||||
|
||||
if u.MarkReadOnView != nil {
|
||||
user.MarkReadOnView = *u.MarkReadOnView
|
||||
}
|
||||
}
|
||||
|
||||
// UseTimezone converts last login date to the given timezone.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue