Skip to content

Commit

Permalink
rename DaysHeaderService method
Browse files Browse the repository at this point in the history
  • Loading branch information
mvmike committed Jan 12, 2024
1 parent 669db92 commit 74c71ee
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down Expand Up @@ -56,9 +56,9 @@ object DaysHeaderService {
ActionableView.RowHeader.addListener(context, widgetRemoteView)
}

private fun getRotatedWeekDays(startDayOfWeek: DayOfWeek): List<DayOfWeek> {
fun getRotatedDaysOfWeek(firstDayOfWeek: DayOfWeek): List<DayOfWeek> {
val daysOfWeek = DayOfWeek.entries.toMutableList()
Collections.rotate(daysOfWeek, -startDayOfWeek.ordinal)
Collections.rotate(daysOfWeek, -firstDayOfWeek.ordinal)
return daysOfWeek.toList()
}
}

0 comments on commit 74c71ee

Please sign in to comment.