区切りを月に戻した

This commit is contained in:
ろむねこ 2024-07-23 13:56:49 +09:00
parent aece6909ad
commit 8da7b26d72
Signed by: Fujimatsu
GPG Key ID: FA1F39A1BA37D168

View File

@ -181,9 +181,9 @@ public class HistoryItemListAdapter extends RecyclerView.Adapter<HistoryItemList
} }
}); });
if (holder instanceof MonthHeaderViewHolder) { if (holder instanceof MonthHeaderViewHolder) {
// ((MonthHeaderViewHolder) holder).monthHeaderTextView.setText(historyData.getRegisteredAt().getMonth() + ""); ((MonthHeaderViewHolder) holder).monthHeaderTitle.setText(historyData.getRegisteredAt().getMonth() + "");
// DEBUG: 月をまたぐデータがないので // // DEBUG: 月をまたぐデータがないので
((MonthHeaderViewHolder) holder).monthHeaderTitle.setText(historyData.getRegisteredAt().getDate() + ""); // ((MonthHeaderViewHolder) holder).monthHeaderTitle.setText(historyData.getRegisteredAt().getDate() + "");
((MonthHeaderViewHolder) holder).monthTotalTextView.setText(getMonthTotal(historyData) + ""); ((MonthHeaderViewHolder) holder).monthTotalTextView.setText(getMonthTotal(historyData) + "");
((MonthHeaderViewHolder) holder).checkAllButton.setOnClickListener(v -> { ((MonthHeaderViewHolder) holder).checkAllButton.setOnClickListener(v -> {
Toast.makeText(v.getContext(), "実装中", Toast.LENGTH_SHORT).show(); Toast.makeText(v.getContext(), "実装中", Toast.LENGTH_SHORT).show();
@ -198,9 +198,9 @@ public class HistoryItemListAdapter extends RecyclerView.Adapter<HistoryItemList
} else { } else {
HistoryModel previousHistoryModel = historyDataList.getList().get(historyDataList.getList().indexOf(historyModel) - 1); HistoryModel previousHistoryModel = historyDataList.getList().get(historyDataList.getList().indexOf(historyModel) - 1);
// getMonth()はDeprecated TODO: やめる // getMonth()はDeprecated TODO: やめる
// return historyModel.getRegisteredAt().getMonth() != previousHistoryModel.getRegisteredAt().getMonth(); return historyModel.getRegisteredAt().getMonth() != previousHistoryModel.getRegisteredAt().getMonth();
// DEBUG: 月をまたぐデータがないので // DEBUG: 月をまたぐデータがないので
return historyModel.getRegisteredAt().getDate() != previousHistoryModel.getRegisteredAt().getDate(); // return historyModel.getRegisteredAt().getDate() != previousHistoryModel.getRegisteredAt().getDate();
} }
} }