diff --git a/component/viewer/src/main/java/one/nem/lacerta/component/viewer/ViewerViewPagerAdapter.java b/component/viewer/src/main/java/one/nem/lacerta/component/viewer/ViewerViewPagerAdapter.java index b42634b5..e4646237 100644 --- a/component/viewer/src/main/java/one/nem/lacerta/component/viewer/ViewerViewPagerAdapter.java +++ b/component/viewer/src/main/java/one/nem/lacerta/component/viewer/ViewerViewPagerAdapter.java @@ -38,7 +38,11 @@ public class ViewerViewPagerAdapter extends FragmentStateAdapter { @NonNull @Override public Fragment createFragment(int position) { - return ViewerBodyFragment.newInstance(fragmentTargetIdList.get(position), fragmentTitleList.get(position)); + if (fragmentRevisionList != null && fragmentRevisionList.size() > position) { + return ViewerBodyFragment.newInstance(fragmentTargetIdList.get(position), fragmentTitleList.get(position), fragmentRevisionList.get(position)); + } else { + return ViewerBodyFragment.newInstance(fragmentTargetIdList.get(position), fragmentTitleList.get(position)); + } } @Override