summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2022-11-27 12:28:24 +0100
committerByteHamster <info@bytehamster.com>2022-11-27 12:28:24 +0100
commit6c1bf9db0590a5906ad76c1cc1e5877146ac932a (patch)
tree5f1a140aee23eefc2b5613f499bb89d5190b5987 /app
parent3973f450bed152a10aa46de23791f9028da33f8b (diff)
downloadAntennaPod-6c1bf9db0590a5906ad76c1cc1e5877146ac932a.zip
Refresh home sections when resuming
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/ui/home/sections/DownloadsSection.java6
-rw-r--r--app/src/main/java/de/danoeh/antennapod/ui/home/sections/EpisodesSurpriseSection.java7
-rw-r--r--app/src/main/java/de/danoeh/antennapod/ui/home/sections/InboxSection.java6
-rw-r--r--app/src/main/java/de/danoeh/antennapod/ui/home/sections/QueueSection.java7
-rw-r--r--app/src/main/java/de/danoeh/antennapod/ui/home/sections/SubscriptionsSection.java7
5 files changed, 28 insertions, 5 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/ui/home/sections/DownloadsSection.java b/app/src/main/java/de/danoeh/antennapod/ui/home/sections/DownloadsSection.java
index dc072921f..78c336335 100644
--- a/app/src/main/java/de/danoeh/antennapod/ui/home/sections/DownloadsSection.java
+++ b/app/src/main/java/de/danoeh/antennapod/ui/home/sections/DownloadsSection.java
@@ -63,9 +63,13 @@ public class DownloadsSection extends HomeSection {
SwipeActions swipeActions = new SwipeActions(this, CompletedDownloadsFragment.TAG);
swipeActions.attachTo(viewBinding.recyclerView);
swipeActions.setFilter(new FeedItemFilter(FeedItemFilter.DOWNLOADED));
+ return view;
+ }
+ @Override
+ public void onStart() {
+ super.onStart();
loadItems();
- return view;
}
@Override
diff --git a/app/src/main/java/de/danoeh/antennapod/ui/home/sections/EpisodesSurpriseSection.java b/app/src/main/java/de/danoeh/antennapod/ui/home/sections/EpisodesSurpriseSection.java
index 680bb5ef4..8aaeb1412 100644
--- a/app/src/main/java/de/danoeh/antennapod/ui/home/sections/EpisodesSurpriseSection.java
+++ b/app/src/main/java/de/danoeh/antennapod/ui/home/sections/EpisodesSurpriseSection.java
@@ -68,11 +68,16 @@ public class EpisodesSurpriseSection extends HomeSection {
if (seed == 0) {
seed = new Random().nextInt();
}
- loadItems();
return view;
}
@Override
+ public void onStart() {
+ super.onStart();
+ loadItems();
+ }
+
+ @Override
protected void handleMoreClick() {
((MainActivity) requireActivity()).loadChildFragment(new AllEpisodesFragment());
}
diff --git a/app/src/main/java/de/danoeh/antennapod/ui/home/sections/InboxSection.java b/app/src/main/java/de/danoeh/antennapod/ui/home/sections/InboxSection.java
index 8138edd89..92bb0c381 100644
--- a/app/src/main/java/de/danoeh/antennapod/ui/home/sections/InboxSection.java
+++ b/app/src/main/java/de/danoeh/antennapod/ui/home/sections/InboxSection.java
@@ -65,9 +65,13 @@ public class InboxSection extends HomeSection {
SwipeActions swipeActions = new SwipeActions(this, InboxFragment.TAG);
swipeActions.attachTo(viewBinding.recyclerView);
swipeActions.setFilter(new FeedItemFilter(FeedItemFilter.NEW));
+ return view;
+ }
+ @Override
+ public void onStart() {
+ super.onStart();
loadItems();
- return view;
}
@Override
diff --git a/app/src/main/java/de/danoeh/antennapod/ui/home/sections/QueueSection.java b/app/src/main/java/de/danoeh/antennapod/ui/home/sections/QueueSection.java
index 57fc85192..e35068e58 100644
--- a/app/src/main/java/de/danoeh/antennapod/ui/home/sections/QueueSection.java
+++ b/app/src/main/java/de/danoeh/antennapod/ui/home/sections/QueueSection.java
@@ -58,11 +58,16 @@ public class QueueSection extends HomeSection {
viewBinding.recyclerView.setLayoutManager(
new LinearLayoutManager(getContext(), RecyclerView.HORIZONTAL, false));
viewBinding.recyclerView.setAdapter(listAdapter);
- loadItems();
return view;
}
@Override
+ public void onStart() {
+ super.onStart();
+ loadItems();
+ }
+
+ @Override
protected void handleMoreClick() {
((MainActivity) requireActivity()).loadChildFragment(new QueueFragment());
}
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 81dddbff3..b10d20e7b 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
@@ -44,11 +44,16 @@ public class SubscriptionsSection extends HomeSection {
listAdapter = new HorizontalFeedListAdapter((MainActivity) getActivity());
listAdapter.setDummyViews(NUM_FEEDS);
viewBinding.recyclerView.setAdapter(listAdapter);
- loadItems();
return view;
}
@Override
+ public void onStart() {
+ super.onStart();
+ loadItems();
+ }
+
+ @Override
protected void handleMoreClick() {
((MainActivity) requireActivity()).loadChildFragment(new SubscriptionFragment());
}