aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-11-07 11:12:39 -0800
committerScott Jackson <daneren2005@gmail.com>2015-11-07 11:12:39 -0800
commite947075d218e8ad4176a2a4ec384d6f1ef67e78b (patch)
tree6941540351747972bcd0fe1438850b528b2a6423 /app/src/main
parent2db94138b5e8e8715170e848d815c45e05bced47 (diff)
downloaddsub-e947075d218e8ad4176a2a4ec384d6f1ef67e78b.tar.gz
dsub-e947075d218e8ad4176a2a4ec384d6f1ef67e78b.tar.bz2
dsub-e947075d218e8ad4176a2a4ec384d6f1ef67e78b.zip
#592 Fix recent podcasts not showing up on rotate
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java
index a76470dd..1f677597 100644
--- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java
+++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java
@@ -63,6 +63,18 @@ public class SelectPodcastsFragment extends SelectRecyclerFragment<Serializable>
if (Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_LARGE_ALBUM_ART, true) && hasCoverArt) {
largeAlbums = true;
}
+
+ if(bundle != null && serialize) {
+ newestEpisodes = (MusicDirectory) bundle.getSerializable(Constants.FRAGMENT_LIST2);
+ }
+ }
+
+ @Override
+ public void onSaveInstanceState(Bundle outState) {
+ super.onSaveInstanceState(outState);
+ if(serialize) {
+ outState.putSerializable(Constants.FRAGMENT_LIST2, newestEpisodes);
+ }
}
@Override
@@ -143,7 +155,7 @@ public class SelectPodcastsFragment extends SelectRecyclerFragment<Serializable>
} else {
List<String> headers = Arrays.asList(PodcastChannelAdapter.EPISODE_HEADER, PodcastChannelAdapter.CHANNEL_HEADER);
- List<MusicDirectory.Entry> episodes = newestEpisodes.getChildren();
+ List<MusicDirectory.Entry> episodes = newestEpisodes.getChildren(false, true);
List<Serializable> serializableEpisodes = new ArrayList<>();
// Put 3 in current list