diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-11-03 08:49:34 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-11-03 08:49:34 -0800 |
commit | 35aad94204cbe560fac2a8468f5ab8b3ee92b557 (patch) | |
tree | 06fc2c6424675d68afdd77a571d4548e6ab82bc2 /app | |
parent | 183004516e23e777026c4a15ecc83d3613fcc216 (diff) | |
download | dsub-35aad94204cbe560fac2a8468f5ab8b3ee92b557.tar.gz dsub-35aad94204cbe560fac2a8468f5ab8b3ee92b557.tar.bz2 dsub-35aad94204cbe560fac2a8468f5ab8b3ee92b557.zip |
Fix errors with less than 3 recent podcast episodes
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/adapter/PodcastChannelAdapter.java | 2 | ||||
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/adapter/PodcastChannelAdapter.java b/app/src/main/java/github/daneren2005/dsub/adapter/PodcastChannelAdapter.java index d9290f49..de4dffa6 100644 --- a/app/src/main/java/github/daneren2005/dsub/adapter/PodcastChannelAdapter.java +++ b/app/src/main/java/github/daneren2005/dsub/adapter/PodcastChannelAdapter.java @@ -166,6 +166,8 @@ public class PodcastChannelAdapter extends SectionAdapter<Serializable> implemen } }); toggleSelectionView.setImageResource(DrawableTint.getDrawableRes(context, selectToggleAttr)); + } else { + toggleSelectionView.setVisibility(View.GONE); } } else { display = context.getResources().getString(R.string.select_podcasts_channels); 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 d605cecd..a76470dd 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java @@ -147,7 +147,7 @@ public class SelectPodcastsFragment extends SelectRecyclerFragment<Serializable> List<Serializable> serializableEpisodes = new ArrayList<>(); // Put 3 in current list - while(serializableEpisodes.size() < 3) { + while(serializableEpisodes.size() < 3 && !episodes.isEmpty()) { serializableEpisodes.add(episodes.remove(0)); } |