Merge pull request #1167 from Honk2/master

modified day code validation for multi day events to fix 1164
This commit is contained in:
Tibor Kaputa 2020-07-06 16:46:00 +02:00 committed by GitHub
commit 847262170b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -601,8 +601,9 @@ class WeekFragment : Fragment(), WeeklyCalendar {
}
}
val dayCode = Formatter.getDayCodeFromDateTime(startDateTime)
val dayOfWeek = dayColumns.indexOfFirst { it.tag == dayCode }
val dayCodeStart = Formatter.getDayCodeFromDateTime(startDateTime).toInt()
val dayCodeEnd = Formatter.getDayCodeFromDateTime(endDateTime).toInt()
val dayOfWeek = dayColumns.indexOfFirst { it.tag.toInt() == dayCodeStart || (it.tag.toInt() > dayCodeStart && it.tag.toInt() <= dayCodeEnd) }
if (dayOfWeek == -1) {
return
}