mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-18 20:50:40 +01:00
fixing some current time related glitches on the weekly view
This commit is contained in:
parent
5ea14a5aa2
commit
dae0ba67d8
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user