mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
add a setting to always scroll selected entry to the top of the page, even if it fits entirely on screen (#1088)
This commit is contained in:
@@ -65,6 +65,8 @@ public class UserSettings extends AbstractModel {
|
||||
@Column(name = "scroll_speed")
|
||||
private int scrollSpeed;
|
||||
|
||||
private boolean alwaysScrollToEntry;
|
||||
|
||||
private boolean email;
|
||||
private boolean gmail;
|
||||
private boolean facebook;
|
||||
|
||||
@@ -35,6 +35,9 @@ public class Settings implements Serializable {
|
||||
@ApiModelProperty(value = "user's preferred scroll speed when navigating between entries", required = true)
|
||||
private int scrollSpeed;
|
||||
|
||||
@ApiModelProperty(value = "always scroll selected entry to the top of the page, even if it fits entirely on screen", required = true)
|
||||
private boolean alwaysScrollToEntry;
|
||||
|
||||
@ApiModelProperty(value = "sharing settings", required = true)
|
||||
private SharingSettings sharingSettings = new SharingSettings();
|
||||
|
||||
|
||||
@@ -103,6 +103,7 @@ public class UserREST {
|
||||
s.setCustomJs(settings.getCustomJs());
|
||||
s.setLanguage(settings.getLanguage());
|
||||
s.setScrollSpeed(settings.getScrollSpeed());
|
||||
s.setAlwaysScrollToEntry(settings.isAlwaysScrollToEntry());
|
||||
} else {
|
||||
s.setReadingMode(ReadingMode.unread.name());
|
||||
s.setReadingOrder(ReadingOrder.desc.name());
|
||||
@@ -120,6 +121,7 @@ public class UserREST {
|
||||
s.setScrollMarks(true);
|
||||
s.setLanguage("en");
|
||||
s.setScrollSpeed(400);
|
||||
s.setAlwaysScrollToEntry(false);
|
||||
}
|
||||
return Response.ok(s).build();
|
||||
}
|
||||
@@ -145,6 +147,7 @@ public class UserREST {
|
||||
s.setCustomJs(settings.getCustomJs());
|
||||
s.setLanguage(settings.getLanguage());
|
||||
s.setScrollSpeed(settings.getScrollSpeed());
|
||||
s.setAlwaysScrollToEntry(settings.isAlwaysScrollToEntry());
|
||||
|
||||
s.setEmail(settings.getSharingSettings().isEmail());
|
||||
s.setGmail(settings.getSharingSettings().isGmail());
|
||||
|
||||
Reference in New Issue
Block a user