This commit is contained in:
r-ca 2024-01-21 15:43:09 +09:00
parent c45847ecd2
commit 0da5e8a961
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9
2 changed files with 8 additions and 4 deletions

View File

@ -71,10 +71,12 @@ public class ComponentViewerTopFragment extends Fragment {
recyclerView.setAdapter(viewerBodyAdapter);
document.getDocument(documentId).thenAccept(documentDetail -> {
ArrayList<Page> pages = documentDetail.getPages();
viewerBodyAdapter.setPages(pages);
viewerBodyAdapter.setPages(documentDetail.getPages());
// getActivity().runOnUiThread(() -> {
// viewerBodyAdapter.notifyItemRangeChanged(0, pages.size());
// });
getActivity().runOnUiThread(() -> {
viewerBodyAdapter.notifyItemRangeChanged(0, pages.size());
viewerBodyAdapter.notifyDataSetChanged();
});
});

View File

@ -139,9 +139,11 @@ public class DocumentImpl implements Document {
DocumentDetail detail = new DocumentDetail();
getPagesByXmlMeta(documentId).thenCompose(xmlMetaPageModels -> getPagesByXmlMetaPageModel(documentId, xmlMetaPageModels)).thenAccept(pages -> {
logger.debug(TAG, "pages: " + pages.size());
detail.setMeta(meta);
detail.setPages(pages);
});
}).join();
return detail;
});
}