summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2024-08-24 09:37:47 +0200
committerGitHub <noreply@github.com>2024-08-24 09:37:47 +0200
commit251b17c7df17348a11c2c34a1a1d3a8570eb9603 (patch)
tree733cf97e49e2cbc0e19c026bf8f922bc5e10a399
parent895987e5aac7f0b1154955f62559c5c398b16e4e (diff)
downloadAntennaPod-251b17c7df17348a11c2c34a1a1d3a8570eb9603.zip
Ignore new episodes action for non-subscribed feeds (#7335)
-rw-r--r--storage/database/src/main/java/de/danoeh/antennapod/storage/database/FeedDatabaseWriter.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/FeedDatabaseWriter.java b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/FeedDatabaseWriter.java
index a62e18809..6e1ff7302 100644
--- a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/FeedDatabaseWriter.java
+++ b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/FeedDatabaseWriter.java
@@ -182,10 +182,11 @@ public abstract class FeedDatabaseWriter {
savedFeed.getItems().add(idx, item);
}
- if (item.getPubDate() == null
+ boolean shouldPerformNewEpisodesAction = item.getPubDate() == null
|| priorMostRecentDate == null
|| priorMostRecentDate.before(item.getPubDate())
- || priorMostRecentDate.equals(item.getPubDate())) {
+ || priorMostRecentDate.equals(item.getPubDate());
+ if (savedFeed.getState() == Feed.STATE_SUBSCRIBED && shouldPerformNewEpisodesAction) {
Log.d(TAG, "Performing new episode action for item published on " + item.getPubDate()
+ ", prior most recent date = " + priorMostRecentDate);
FeedPreferences.NewEpisodesAction action = savedFeed.getPreferences().getNewEpisodesAction();