Refresh home sections when resuming
This commit is contained in:
parent
3973f450be
commit
6c1bf9db05
|
@ -63,11 +63,15 @@ public class DownloadsSection extends HomeSection {
|
|||
SwipeActions swipeActions = new SwipeActions(this, CompletedDownloadsFragment.TAG);
|
||||
swipeActions.attachTo(viewBinding.recyclerView);
|
||||
swipeActions.setFilter(new FeedItemFilter(FeedItemFilter.DOWNLOADED));
|
||||
|
||||
loadItems();
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
loadItems();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleMoreClick() {
|
||||
((MainActivity) requireActivity()).loadChildFragment(new CompletedDownloadsFragment());
|
||||
|
|
|
@ -68,10 +68,15 @@ 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());
|
||||
|
|
|
@ -65,11 +65,15 @@ public class InboxSection extends HomeSection {
|
|||
SwipeActions swipeActions = new SwipeActions(this, InboxFragment.TAG);
|
||||
swipeActions.attachTo(viewBinding.recyclerView);
|
||||
swipeActions.setFilter(new FeedItemFilter(FeedItemFilter.NEW));
|
||||
|
||||
loadItems();
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
loadItems();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleMoreClick() {
|
||||
((MainActivity) requireActivity()).loadChildFragment(new InboxFragment());
|
||||
|
|
|
@ -58,10 +58,15 @@ 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());
|
||||
|
|
|
@ -44,10 +44,15 @@ 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());
|
||||
|
|
Loading…
Reference in New Issue