diff --git a/component/viewer/src/main/java/one/nem/lacerta/component/viewer/ViewerContainerFragment.java b/component/viewer/src/main/java/one/nem/lacerta/component/viewer/ViewerContainerFragment.java index be70a03d..28adb7d6 100644 --- a/component/viewer/src/main/java/one/nem/lacerta/component/viewer/ViewerContainerFragment.java +++ b/component/viewer/src/main/java/one/nem/lacerta/component/viewer/ViewerContainerFragment.java @@ -121,10 +121,12 @@ public class ViewerContainerFragment extends Fragment { logger.debug("ViewerContainerFragment", "hasCombined: " + hasCombined); lacertaLibrary.getCombinedDocumentToxiList(documentId).thenAccept(combinedDocumentToxiList -> { logger.debug("ViewerContainerFragment", "combinedDocumentToxiList: " + combinedDocumentToxiList.size()); - ArrayList pageIdList = combinedDocumentToxiList.stream().map(ToxiDocumentModel::getChildDocumentId).collect(Collectors.toCollection(ArrayList::new)); - ArrayList pageTitleList = combinedDocumentToxiList.stream().map(ToxiDocumentModel::getTitleCache).collect(Collectors.toCollection(ArrayList::new)); - viewerViewPagerAdapter.setFragmentTargetIdList(pageIdList); - viewerViewPagerAdapter.setFragmentTitleList(pageTitleList); + + viewerViewPagerAdapter.setFragmentTargetIdList( + combinedDocumentToxiList.stream().map(ToxiDocumentModel::getChildDocumentId).collect(Collectors.toCollection(ArrayList::new))); + viewerViewPagerAdapter.setFragmentTitleList( + combinedDocumentToxiList.stream().map(ToxiDocumentModel::getTitleCache).collect(Collectors.toCollection(ArrayList::new))); + viewerViewPagerAdapter.notifyItemRangeChanged(0, combinedDocumentToxiList.size()); }); } else {