|
|
|
|
@ -160,9 +160,9 @@ class HistorySessionRowRepresentableAdapter( |
|
|
|
|
|
|
|
|
|
// Add headers if the date doesn't exist yet |
|
|
|
|
for ((index, session) in realmResults.withIndex()) { |
|
|
|
|
calendar.time = session.creationDate |
|
|
|
|
calendar.time = session.startDate ?: session.creationDate |
|
|
|
|
if (checkHeaderCondition(calendar, previousYear, previousMonth)) { |
|
|
|
|
headersPositions[index + headersPositions.size + pendingRealmResults.size] = session.creationDate |
|
|
|
|
headersPositions[index + headersPositions.size + pendingRealmResults.size] = session.startDate ?: session.creationDate |
|
|
|
|
previousYear = calendar.get(Calendar.YEAR) |
|
|
|
|
previousMonth = calendar.get(Calendar.MONTH) |
|
|
|
|
} |
|
|
|
|
|