This commit is contained in:
rca 2024-07-06 12:08:43 +09:00
parent d27f04dade
commit f87ff116bc

View File

@ -117,17 +117,7 @@ public class SettingMainFragment extends Fragment {
}).thenAccept(childModels -> {
mainAdapter.setChildDataList(childModels);
requireActivity().runOnUiThread(() -> {
try {
mainAdapter.notifyItemRangeInserted(0, childModels.size());
} catch (IndexOutOfBoundsException e) {
try {
mainAdapter.notifyDataSetChanged();
} catch (Exception e1) {
Toast.makeText(requireContext(), "エラーが発生しました", Toast.LENGTH_SHORT).show();
}
} catch (Exception e) {
Toast.makeText(requireContext(), "エラーが発生しました", Toast.LENGTH_SHORT).show();
}
mainAdapter.notifyDataSetChanged(); // Workaround
});
});