From cd140f2c104a83c8fc624938a51ded7cdf11ceee Mon Sep 17 00:00:00 2001 From: Till Hellmund Date: Tue, 10 Nov 2020 13:47:44 +0100 Subject: [PATCH] Fix issue where `goToCurrentTime()` was ignored if WeekView was scrolled to the current date, but not the current time --- core/src/main/java/com/alamkanak/weekview/WeekView.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/java/com/alamkanak/weekview/WeekView.kt b/core/src/main/java/com/alamkanak/weekview/WeekView.kt index 2b4c2f59f..e62fadfc6 100644 --- a/core/src/main/java/com/alamkanak/weekview/WeekView.kt +++ b/core/src/main/java/com/alamkanak/weekview/WeekView.kt @@ -1178,6 +1178,7 @@ class WeekView @JvmOverloads constructor( private fun goToDateWithCompletion(date: Calendar, onComplete: () -> Unit) { val adjustedDate = viewState.getDateWithinDateRange(date) if (adjustedDate.toEpochDays() == viewState.firstVisibleDate.toEpochDays()) { + onComplete() return }