From 74c71ee594777016ec583f65f1700cb20ca59cb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miquel=20Mart=C3=AD?= Date: Fri, 12 Jan 2024 18:11:31 +0100 Subject: [PATCH] rename DaysHeaderService method --- .../domain/component/DaysHeaderService.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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