mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
fixing some current time related glitches on the weekly view
This commit is contained in:
@@ -475,7 +475,11 @@ class WeekFragment : Fragment(), WeeklyCalendar {
|
||||
private fun addCurrentTimeIndicator(minuteHeight: Float) {
|
||||
if (todayColumnIndex != -1) {
|
||||
val minutes = DateTime().minuteOfDay
|
||||
val todayColumn = dayColumns.getOrNull(todayColumnIndex) ?: return
|
||||
if (todayColumnIndex >= dayColumns.size) {
|
||||
currentTimeView?.alpha = 0f
|
||||
return
|
||||
}
|
||||
|
||||
if (currentTimeView != null) {
|
||||
mView.week_events_holder.removeView(currentTimeView)
|
||||
}
|
||||
@@ -494,7 +498,7 @@ class WeekFragment : Fragment(), WeeklyCalendar {
|
||||
x = if (weeklyViewDays == 1) {
|
||||
0f
|
||||
} else {
|
||||
todayColumn.x - extraWidth / 2
|
||||
(mView.width / weeklyViewDays * todayColumnIndex).toFloat() - extraWidth / 2f
|
||||
}
|
||||
|
||||
y = minutes * minuteHeight - markerHeight / 2
|
||||
|
Reference in New Issue
Block a user