diff --git a/app/src/main/kotlin/cat/mvmike/minimalcalendarwidget/domain/component/DaysHeaderService.kt b/app/src/main/kotlin/cat/mvmike/minimalcalendarwidget/domain/component/DaysHeaderService.kt index 4ac28222..87dbf1e3 100644 --- a/app/src/main/kotlin/cat/mvmike/minimalcalendarwidget/domain/component/DaysHeaderService.kt +++ b/app/src/main/kotlin/cat/mvmike/minimalcalendarwidget/domain/component/DaysHeaderService.kt @@ -28,7 +28,7 @@ object DaysHeaderService { ) { val daysHeaderRow: RemoteViews = GraphicResolver.createDaysHeaderRow(context) - getRotatedWeekDays(firstDayOfWeek).forEach { dayOfWeek -> + getRotatedDaysOfWeek(firstDayOfWeek).forEach { dayOfWeek -> val cellHeader = widgetTheme.getCellHeader(dayOfWeek) val backgroundWithTransparency = cellHeader.background ?.let { GraphicResolver.getColourAsString(context, it) } @@ -56,9 +56,9 @@ object DaysHeaderService { ActionableView.RowHeader.addListener(context, widgetRemoteView) } - private fun getRotatedWeekDays(startDayOfWeek: DayOfWeek): List { + fun getRotatedDaysOfWeek(firstDayOfWeek: DayOfWeek): List { val daysOfWeek = DayOfWeek.entries.toMutableList() - Collections.rotate(daysOfWeek, -startDayOfWeek.ordinal) + Collections.rotate(daysOfWeek, -firstDayOfWeek.ordinal) return daysOfWeek.toList() } } \ No newline at end of file