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) {
|
private fun addCurrentTimeIndicator(minuteHeight: Float) {
|
||||||
if (todayColumnIndex != -1) {
|
if (todayColumnIndex != -1) {
|
||||||
val minutes = DateTime().minuteOfDay
|
val minutes = DateTime().minuteOfDay
|
||||||
val todayColumn = dayColumns.getOrNull(todayColumnIndex) ?: return
|
if (todayColumnIndex >= dayColumns.size) {
|
||||||
|
currentTimeView?.alpha = 0f
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (currentTimeView != null) {
|
if (currentTimeView != null) {
|
||||||
mView.week_events_holder.removeView(currentTimeView)
|
mView.week_events_holder.removeView(currentTimeView)
|
||||||
}
|
}
|
||||||
@@ -494,7 +498,7 @@ class WeekFragment : Fragment(), WeeklyCalendar {
|
|||||||
x = if (weeklyViewDays == 1) {
|
x = if (weeklyViewDays == 1) {
|
||||||
0f
|
0f
|
||||||
} else {
|
} else {
|
||||||
todayColumn.x - extraWidth / 2
|
(mView.width / weeklyViewDays * todayColumnIndex).toFloat() - extraWidth / 2f
|
||||||
}
|
}
|
||||||
|
|
||||||
y = minutes * minuteHeight - markerHeight / 2
|
y = minutes * minuteHeight - markerHeight / 2
|
||||||
|
Reference in New Issue
Block a user