From 7bcb2f07ab9641538846c43181e137f4b057f5d0 Mon Sep 17 00:00:00 2001 From: r-ca Date: Mon, 29 Jan 2024 02:01:18 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=AA=E3=83=95=E3=82=A1=E3=82=AF=E3=82=BF?= =?UTF-8?q?=E3=83=AA=E3=83=B3=E3=82=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/viewer/ViewerContainerFragment.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 {