暫定実装

This commit is contained in:
ろむねこ 2024-07-23 11:03:37 +09:00
parent fc0091b24a
commit 20a24b4ea3
Signed by: Fujimatsu
GPG Key ID: FA1F39A1BA37D168

View File

@ -150,7 +150,13 @@ public class HistoryItemListAdapter extends RecyclerView.Adapter<HistoryItemList
private boolean isFirstOfMonth(HistoryModel historyModel) {
// 1個前の要素と比較して月が変わったかどうかを判定する
if ()
if (historyDataList.getList().indexOf(historyModel) == 0) {
return true;
} else {
HistoryModel previousHistoryModel = historyDataList.getList().get(historyDataList.getList().indexOf(historyModel) - 1);
// getMonth()はDeprecated TODO: やめる
return historyModel.getRegisteredAt().getMonth() != previousHistoryModel.getRegisteredAt().getMonth();
}
}
@Override