|
@@ -28,6 +28,7 @@ type User struct {
|
|
|
KeyboardShortcuts bool `json:"keyboard_shortcuts"`
|
|
KeyboardShortcuts bool `json:"keyboard_shortcuts"`
|
|
|
ShowReadingTime bool `json:"show_reading_time"`
|
|
ShowReadingTime bool `json:"show_reading_time"`
|
|
|
EntrySwipe bool `json:"entry_swipe"`
|
|
EntrySwipe bool `json:"entry_swipe"`
|
|
|
|
|
+ DoubleTap bool `json:"double_tap"`
|
|
|
LastLoginAt *time.Time `json:"last_login_at"`
|
|
LastLoginAt *time.Time `json:"last_login_at"`
|
|
|
DisplayMode string `json:"display_mode"`
|
|
DisplayMode string `json:"display_mode"`
|
|
|
DefaultReadingSpeed int `json:"default_reading_speed"`
|
|
DefaultReadingSpeed int `json:"default_reading_speed"`
|
|
@@ -62,6 +63,7 @@ type UserModificationRequest struct {
|
|
|
KeyboardShortcuts *bool `json:"keyboard_shortcuts"`
|
|
KeyboardShortcuts *bool `json:"keyboard_shortcuts"`
|
|
|
ShowReadingTime *bool `json:"show_reading_time"`
|
|
ShowReadingTime *bool `json:"show_reading_time"`
|
|
|
EntrySwipe *bool `json:"entry_swipe"`
|
|
EntrySwipe *bool `json:"entry_swipe"`
|
|
|
|
|
+ DoubleTap *bool `json:"double_tap"`
|
|
|
DisplayMode *string `json:"display_mode"`
|
|
DisplayMode *string `json:"display_mode"`
|
|
|
DefaultReadingSpeed *int `json:"default_reading_speed"`
|
|
DefaultReadingSpeed *int `json:"default_reading_speed"`
|
|
|
CJKReadingSpeed *int `json:"cjk_reading_speed"`
|
|
CJKReadingSpeed *int `json:"cjk_reading_speed"`
|
|
@@ -131,6 +133,10 @@ func (u *UserModificationRequest) Patch(user *User) {
|
|
|
user.EntrySwipe = *u.EntrySwipe
|
|
user.EntrySwipe = *u.EntrySwipe
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if u.DoubleTap != nil {
|
|
|
|
|
+ user.DoubleTap = *u.DoubleTap
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if u.DisplayMode != nil {
|
|
if u.DisplayMode != nil {
|
|
|
user.DisplayMode = *u.DisplayMode
|
|
user.DisplayMode = *u.DisplayMode
|
|
|
}
|
|
}
|