This commit is contained in:
ろむねこ 2024-07-23 13:15:52 +09:00
parent fbfb02ad09
commit 2d9c1a10c9
Signed by: Fujimatsu
GPG Key ID: FA1F39A1BA37D168

View File

@ -84,29 +84,35 @@ public class WalletParentWrapperFragment extends Fragment {
private void setupViewPager() {
// デバッグ用
childData.getChildList(new ChildModelCallback() {
@Override
public void onUnchanged() {
// TODO: impl
}
// childData.getChildList(new ChildModelCallback() {
// @Override
// public void onUnchanged() {
// // TODO: impl
// }
//
// @Override
// public void onUpdated(List<ChildModel> childModelList) {
// // TODO: impl
// }
//
// @Override
// public void onFailed(String message) {
// // TODO: impl
// }
// }).thenAccept(childModels -> {
@Override
public void onUpdated(List<ChildModel> childModelList) {
// TODO: impl
}
childData.getChildListDirect().thenAccept(childModels -> {
@Override
public void onFailed(String message) {
// TODO: impl
}
}).thenAccept(childModels -> {
tabAdapter.setChildList(childModels);
requireActivity().runOnUiThread(() -> {
tabAdapter.notifyDataSetChanged();
new TabLayoutMediator(tabLayout, viewPager, (tab, position) -> {
tab.setText(childModels.get(position).getName());
}).attach();
requireActivity().runOnUiThread(() -> tabAdapter.notifyDataSetChanged());
});
});
}