add a setting to mark entries of a feed as read after a number of days (#2041)

This commit is contained in:
Athou
2026-02-20 10:45:17 +01:00
parent f87d3359c2
commit 3fd5cfdecd
39 changed files with 507 additions and 1 deletions

View File

@@ -68,6 +68,9 @@ public class Subscription implements Serializable {
@Schema(description = "whether to send push notifications for new entries of this feed", required = true)
private boolean pushNotificationsEnabled;
@Schema(description = "automatically mark entries as read after this many days (null to disable)")
private Integer autoMarkAsReadAfterDays;
public static Subscription build(FeedSubscription subscription, UnreadCount unreadCount) {
FeedCategory category = subscription.getCategory();
Feed feed = subscription.getFeed();
@@ -89,6 +92,7 @@ public class Subscription implements Serializable {
sub.setFilter(subscription.getFilter());
sub.setFilterLegacy(subscription.getFilterLegacy());
sub.setPushNotificationsEnabled(subscription.isPushNotificationsEnabled());
sub.setAutoMarkAsReadAfterDays(subscription.getAutoMarkAsReadAfterDays());
return sub;
}

View File

@@ -34,4 +34,7 @@ public class FeedModificationRequest implements Serializable {
@Schema(description = "whether to send push notifications for new entries of this feed")
private boolean pushNotificationsEnabled;
@Schema(description = "automatically mark entries as read after this many days (null to disable)")
private Integer autoMarkAsReadAfterDays;
}

View File

@@ -437,6 +437,7 @@ public class FeedREST {
}
subscription.setPushNotificationsEnabled(req.isPushNotificationsEnabled());
subscription.setAutoMarkAsReadAfterDays(req.getAutoMarkAsReadAfterDays());
if (StringUtils.isNotBlank(req.getName())) {
subscription.setTitle(req.getName());