add setting to disable mark as read confirmation (#1110)

This commit is contained in:
Athou
2023-08-03 08:46:43 +02:00
parent da6f2050f9
commit cb779ec494
37 changed files with 179 additions and 8 deletions

View File

@@ -66,6 +66,7 @@ public class UserSettings extends AbstractModel {
private int scrollSpeed;
private boolean alwaysScrollToEntry;
private boolean markAllAsReadConfirmation;
private boolean email;
private boolean gmail;

View File

@@ -38,6 +38,9 @@ public class Settings implements Serializable {
@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 = "ask for confirmation when marking all entries as read", required = true)
private boolean markAllAsReadConfirmation;
@ApiModelProperty(value = "sharing settings", required = true)
private SharingSettings sharingSettings = new SharingSettings();

View File

@@ -104,6 +104,7 @@ public class UserREST {
s.setLanguage(settings.getLanguage());
s.setScrollSpeed(settings.getScrollSpeed());
s.setAlwaysScrollToEntry(settings.isAlwaysScrollToEntry());
s.setMarkAllAsReadConfirmation(settings.isMarkAllAsReadConfirmation());
} else {
s.setReadingMode(ReadingMode.unread.name());
s.setReadingOrder(ReadingOrder.desc.name());
@@ -122,6 +123,7 @@ public class UserREST {
s.setLanguage("en");
s.setScrollSpeed(400);
s.setAlwaysScrollToEntry(false);
s.setMarkAllAsReadConfirmation(true);
}
return Response.ok(s).build();
}
@@ -148,6 +150,7 @@ public class UserREST {
s.setLanguage(settings.getLanguage());
s.setScrollSpeed(settings.getScrollSpeed());
s.setAlwaysScrollToEntry(settings.isAlwaysScrollToEntry());
s.setMarkAllAsReadConfirmation(settings.isMarkAllAsReadConfirmation());
s.setEmail(settings.getSharingSettings().isEmail());
s.setGmail(settings.getSharingSettings().isGmail());

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<changeSet id="mark-all-as-read-confirmation" author="athou">
<addColumn tableName="USERSETTINGS">
<column name="markAllAsReadConfirmation" type="BOOLEAN" defaultValueBoolean="true">
<constraints nullable="false" />
</column>
</addColumn>
</changeSet>
</databaseChangeLog>

View File

@@ -21,5 +21,6 @@
<include file="changelogs/db.changelog-3.5.xml" />
<include file="changelogs/db.changelog-3.6.xml" />
<include file="changelogs/db.changelog-3.8.xml" />
<include file="changelogs/db.changelog-3.9.xml" />
</databaseChangeLog>