mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
make "disable pull to refresh" a setting (#1168)
This commit is contained in:
@@ -131,6 +131,7 @@ public class UserSettings extends AbstractModel {
|
||||
private boolean mobileFooter;
|
||||
private boolean unreadCountTitle;
|
||||
private boolean unreadCountFavicon;
|
||||
private boolean disablePullToRefresh;
|
||||
|
||||
private boolean email;
|
||||
private boolean gmail;
|
||||
|
||||
@@ -72,6 +72,9 @@ public class Settings implements Serializable {
|
||||
@Schema(description = "show unread count in the favicon", required = true)
|
||||
private boolean unreadCountFavicon;
|
||||
|
||||
@Schema(description = "disable pull to refresh", required = true)
|
||||
private boolean disablePullToRefresh;
|
||||
|
||||
@Schema(description = "primary theme color to use in the UI")
|
||||
private String primaryColor;
|
||||
|
||||
|
||||
@@ -120,6 +120,7 @@ public class UserREST {
|
||||
s.setMobileFooter(settings.isMobileFooter());
|
||||
s.setUnreadCountTitle(settings.isUnreadCountTitle());
|
||||
s.setUnreadCountFavicon(settings.isUnreadCountFavicon());
|
||||
s.setDisablePullToRefresh(settings.isDisablePullToRefresh());
|
||||
s.setPrimaryColor(settings.getPrimaryColor());
|
||||
} else {
|
||||
s.setReadingMode(ReadingMode.UNREAD);
|
||||
@@ -148,6 +149,7 @@ public class UserREST {
|
||||
s.setMobileFooter(false);
|
||||
s.setUnreadCountTitle(false);
|
||||
s.setUnreadCountFavicon(true);
|
||||
s.setDisablePullToRefresh(true);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
@@ -183,6 +185,7 @@ public class UserREST {
|
||||
s.setMobileFooter(settings.isMobileFooter());
|
||||
s.setUnreadCountTitle(settings.isUnreadCountTitle());
|
||||
s.setUnreadCountFavicon(settings.isUnreadCountFavicon());
|
||||
s.setDisablePullToRefresh(settings.isDisablePullToRefresh());
|
||||
s.setPrimaryColor(settings.getPrimaryColor());
|
||||
|
||||
s.setEmail(settings.getSharingSettings().isEmail());
|
||||
|
||||
@@ -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 https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
|
||||
|
||||
<changeSet id="add-disablePullToRefresh-setting" author="athou">
|
||||
<addColumn tableName="USERSETTINGS">
|
||||
<column name="disablePullToRefresh" type="BOOLEAN" valueBoolean="false">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
@@ -36,5 +36,6 @@
|
||||
<include file="changelogs/db.changelog-5.3.xml" />
|
||||
<include file="changelogs/db.changelog-5.8.xml" />
|
||||
<include file="changelogs/db.changelog-5.11.xml" />
|
||||
<include file="changelogs/db.changelog-5.12.xml" />
|
||||
|
||||
</databaseChangeLog>
|
||||
Reference in New Issue
Block a user