Skip to content

Commit 4093e7f

Browse files
committed
use minimal height at weekly views instant events and tasks
1 parent daa6176 commit 4093e7f

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments

app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/WeekFragment.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,13 @@ class WeekFragment : Fragment(), WeeklyCalendar {
464464
true -> (endDateTime.minuteOfDay - startMinutes)
465465
else -> 1440
466466
}
467-
val range = Range(startMinutes, startMinutes + duration)
467+
468+
var endMinutes = startMinutes + duration
469+
if (endMinutes - startMinutes < minimalHeight) {
470+
endMinutes += Math.round(minimalHeight / minuteHeight)
471+
}
472+
473+
val range = Range(startMinutes, endMinutes)
468474
val eventWeekly = EventWeeklyView(range)
469475

470476
if (!eventTimeRanges.containsKey(currentDayCode)) {

0 commit comments

Comments
 (0)