make "disable pull to refresh" a setting (#1168)

This commit is contained in:
Athou
2025-11-17 08:47:54 +01:00
parent 9c058cf6d6
commit ae78e4691d
42 changed files with 163 additions and 58 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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());

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 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>

View File

@@ -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>