Merge pull request #3729 from ByteHamster/try-fix-crash
Try to fix ArrayIndexOutOfBoundsException
This commit is contained in:
commit
71d281a818
|
@ -245,8 +245,9 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter<AllEpisodesR
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
MainActivity mainActivity = mainActivityRef.get();
|
MainActivity mainActivity = mainActivityRef.get();
|
||||||
if (mainActivity != null) {
|
if (mainActivity != null) {
|
||||||
long[] ids = itemAccess.getItemsIds().toArray();
|
LongList itemIds = itemAccess.getItemsIds();
|
||||||
mainActivity.loadChildFragment(ItemPagerFragment.newInstance(ids, getAdapterPosition()));
|
long[] ids = itemIds.toArray();
|
||||||
|
mainActivity.loadChildFragment(ItemPagerFragment.newInstance(ids, itemIds.indexOf(item.getId())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue