mirror of
https://github.com/Athou/commafeed.git
synced 2026-10-29 08:28:52 +00:00
add a setting to mark entries of a feed as read after a number of days (#2041)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
@@ -437,6 +437,7 @@ public class FeedREST {
|
||||
}
|
||||
|
||||
subscription.setPushNotificationsEnabled(req.isPushNotificationsEnabled());
|
||||
subscription.setAutoMarkAsReadAfterDays(req.getAutoMarkAsReadAfterDays());
|
||||
|
||||
if (StringUtils.isNotBlank(req.getName())) {
|
||||
subscription.setTitle(req.getName());
|
||||
|
||||
Reference in New Issue
Block a user