mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
social sharing buttons
This commit is contained in:
@@ -36,6 +36,8 @@ public class UserSettings extends AbstractModel {
|
||||
|
||||
private boolean showRead;
|
||||
|
||||
private boolean socialButtons;
|
||||
|
||||
@Lob
|
||||
@Column(length = Integer.MAX_VALUE)
|
||||
private String customCss;
|
||||
@@ -80,4 +82,12 @@ public class UserSettings extends AbstractModel {
|
||||
this.showRead = showRead;
|
||||
}
|
||||
|
||||
public boolean isSocialButtons() {
|
||||
return socialButtons;
|
||||
}
|
||||
|
||||
public void setSocialButtons(boolean socialButtons) {
|
||||
this.socialButtons = socialButtons;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,6 +24,9 @@ public class Settings implements Serializable {
|
||||
@ApiProperty(value = "user wants category and feeds with no unread entries shown", required = true)
|
||||
private boolean showRead;
|
||||
|
||||
@ApiProperty(value = "user wants social buttons (facebook, twitter, ...) shown", required = true)
|
||||
private boolean socialButtons;
|
||||
|
||||
@ApiProperty(value = "user's custom css for the website")
|
||||
private String customCss;
|
||||
|
||||
@@ -59,4 +62,12 @@ public class Settings implements Serializable {
|
||||
this.showRead = showRead;
|
||||
}
|
||||
|
||||
public boolean isSocialButtons() {
|
||||
return socialButtons;
|
||||
}
|
||||
|
||||
public void setSocialButtons(boolean socialButtons) {
|
||||
this.socialButtons = socialButtons;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -37,11 +37,13 @@ public class UserREST extends AbstractResourceREST {
|
||||
s.setReadingMode(settings.getReadingMode().name());
|
||||
s.setReadingOrder(settings.getReadingOrder().name());
|
||||
s.setShowRead(settings.isShowRead());
|
||||
s.setSocialButtons(settings.isSocialButtons());
|
||||
s.setCustomCss(settings.getCustomCss());
|
||||
} else {
|
||||
s.setReadingMode(ReadingMode.unread.name());
|
||||
s.setReadingOrder(ReadingOrder.desc.name());
|
||||
s.setShowRead(true);
|
||||
s.setSocialButtons(true);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user