Revisionが指定されている場合はBodyに渡すように

This commit is contained in:
ろむねこ 2024-01-29 11:04:33 +09:00
parent a569182fd1
commit d9a9cd0743
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168

View File

@ -38,7 +38,11 @@ public class ViewerViewPagerAdapter extends FragmentStateAdapter {
@NonNull @NonNull
@Override @Override
public Fragment createFragment(int position) { 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 @Override