diff options
author | H. Lehmann <ByteHamster@users.noreply.github.com> | 2020-01-05 00:45:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-05 00:45:34 +0100 |
commit | 71d281a818d150a4b628fcb40c48b03a73cf956d (patch) | |
tree | ba316848406ad7de85cb4a0bed2fb7550edc2337 /app/src | |
parent | 2d2bf0f7e3354d6544058f5e3b8f0b330e2a3625 (diff) | |
parent | 38e2abd2feb7969afa000ce77b50b6b79e187bb5 (diff) | |
download | AntennaPod-71d281a818d150a4b628fcb40c48b03a73cf956d.zip |
Merge pull request #3729 from ByteHamster/try-fix-crash
Try to fix ArrayIndexOutOfBoundsException
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java index 9cd5cc3ab..eafc4b0a6 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java @@ -245,8 +245,9 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter<AllEpisodesR public void onClick(View v) { MainActivity mainActivity = mainActivityRef.get(); if (mainActivity != null) { - long[] ids = itemAccess.getItemsIds().toArray(); - mainActivity.loadChildFragment(ItemPagerFragment.newInstance(ids, getAdapterPosition())); + LongList itemIds = itemAccess.getItemsIds(); + long[] ids = itemIds.toArray(); + mainActivity.loadChildFragment(ItemPagerFragment.newInstance(ids, itemIds.indexOf(item.getId()))); } } |