リファクタ
This commit is contained in:
parent
9f8c9690b8
commit
ad5fbaf56f
|
@ -143,9 +143,7 @@ public class SettingMainFragment extends Fragment {
|
||||||
|
|
||||||
swipeRefreshLayout.setRefreshing(true);
|
swipeRefreshLayout.setRefreshing(true);
|
||||||
|
|
||||||
return CompletableFuture.allOf(updateParent, updateChildList).thenRun(() -> {
|
return CompletableFuture.allOf(updateParent, updateChildList).thenRun(() -> swipeRefreshLayout.setRefreshing(false));
|
||||||
swipeRefreshLayout.setRefreshing(false);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -166,9 +164,7 @@ public class SettingMainFragment extends Fragment {
|
||||||
recyclerView.setAdapter(mainAdapter);
|
recyclerView.setAdapter(mainAdapter);
|
||||||
|
|
||||||
// ユーザー情報の更新(初回)
|
// ユーザー情報の更新(初回)
|
||||||
updateInfo().thenRunAsync(() -> {
|
updateInfo().thenRunAsync(() -> logger.debug("ユーザー情報の更新完了"));
|
||||||
logger.debug("ユーザー情報の更新完了");
|
|
||||||
});
|
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
@ -193,13 +189,9 @@ public class SettingMainFragment extends Fragment {
|
||||||
childModel.setName(Objects.requireNonNull(((TextView) dialogView.findViewById(R.id.childNameEditText)).getText()).toString());
|
childModel.setName(Objects.requireNonNull(((TextView) dialogView.findViewById(R.id.childNameEditText)).getText()).toString());
|
||||||
childData.addChild(childModel).thenAccept(childModel1 -> { // Debug
|
childData.addChild(childModel).thenAccept(childModel1 -> { // Debug
|
||||||
logger.debug("子供を追加しました: " + childModel1.getName());
|
logger.debug("子供を追加しました: " + childModel1.getName());
|
||||||
}).thenRun(() -> {
|
}).thenRun(() -> updateChildInfo());
|
||||||
updateChildInfo();
|
|
||||||
});
|
|
||||||
})
|
})
|
||||||
.setNeutralButton("閉じる", (dialog, which) -> {
|
.setNeutralButton("閉じる", (dialog, which) -> dialog.cancel()).show();
|
||||||
dialog.cancel();
|
|
||||||
}).show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue
Block a user