summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2023-04-15 15:52:45 +0200
committerGitHub <noreply@github.com>2023-04-15 15:52:45 +0200
commit8ea0d1907b08aaff84fd4c5f74295b1525770c78 (patch)
tree290fdfc03f094b9d743e2ca52675918474a66d20 /app
parenta08f387c56aabe24250f0f932c7839e0677582a5 (diff)
downloadAntennaPod-8ea0d1907b08aaff84fd4c5f74295b1525770c78.zip
Respect 'include marked as played' on home screen (#6435)
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/ui/home/sections/SubscriptionsSection.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/ui/home/sections/SubscriptionsSection.java b/app/src/main/java/de/danoeh/antennapod/ui/home/sections/SubscriptionsSection.java
index b9a1bf8e8..9d5619845 100644
--- a/app/src/main/java/de/danoeh/antennapod/ui/home/sections/SubscriptionsSection.java
+++ b/app/src/main/java/de/danoeh/antennapod/ui/home/sections/SubscriptionsSection.java
@@ -1,5 +1,7 @@
package de.danoeh.antennapod.ui.home.sections;
+import android.content.Context;
+import android.content.SharedPreferences;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
@@ -17,6 +19,7 @@ import de.danoeh.antennapod.event.FeedListUpdateEvent;
import de.danoeh.antennapod.fragment.SubscriptionFragment;
import de.danoeh.antennapod.model.feed.Feed;
import de.danoeh.antennapod.ui.home.HomeSection;
+import de.danoeh.antennapod.ui.statistics.StatisticsFragment;
import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
@@ -79,7 +82,10 @@ public class SubscriptionsSection extends HomeSection {
if (disposable != null) {
disposable.dispose();
}
- disposable = Observable.fromCallable(() -> DBReader.getStatistics(true, 0, Long.MAX_VALUE).feedTime)
+ SharedPreferences prefs = getContext().getSharedPreferences(StatisticsFragment.PREF_NAME, Context.MODE_PRIVATE);
+ boolean includeMarkedAsPlayed = prefs.getBoolean(StatisticsFragment.PREF_INCLUDE_MARKED_PLAYED, false);
+ disposable = Observable.fromCallable(() ->
+ DBReader.getStatistics(includeMarkedAsPlayed, 0, Long.MAX_VALUE).feedTime)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(statisticsData -> {