From 6ed7cc567de0f0fe4a582b877e4548989621a48d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miquel=20Mart=C3=AD?= Date: Mon, 13 Nov 2023 21:16:38 +0100 Subject: [PATCH] fix ktlint format --- .../domain/configuration/Configuration.kt | 64 +++++++++---------- .../domain/intent/ActionableView.kt | 32 +++++----- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/app/src/main/kotlin/cat/mvmike/minimalcalendarwidget/domain/configuration/Configuration.kt b/app/src/main/kotlin/cat/mvmike/minimalcalendarwidget/domain/configuration/Configuration.kt index 1125da37..ef4a47e7 100644 --- a/app/src/main/kotlin/cat/mvmike/minimalcalendarwidget/domain/configuration/Configuration.kt +++ b/app/src/main/kotlin/cat/mvmike/minimalcalendarwidget/domain/configuration/Configuration.kt @@ -55,16 +55,16 @@ sealed class BooleanConfigurationItem( getConfiguration(context).getBoolean(key, defaultValue) data object ShowDeclinedEvents : BooleanConfigurationItem( - key = "SHOW_DECLINED_EVENTS" - ) + key = "SHOW_DECLINED_EVENTS" + ) data object FocusOnCurrentWeek : BooleanConfigurationItem( - key = "FOCUS_ON_CURRENT_WEEK" - ) + key = "FOCUS_ON_CURRENT_WEEK" + ) data object OpenCalendarOnClickedDay : BooleanConfigurationItem( - key = "OPEN_CALENDAR_ON_CLICKED_DAY" - ) + key = "OPEN_CALENDAR_ON_CLICKED_DAY" + ) } sealed class EnumConfigurationItem>( @@ -91,50 +91,50 @@ sealed class EnumConfigurationItem>( abstract fun getCurrentDisplayValue(context: Context): String data object WidgetTheme : EnumConfigurationItem( - key = "WIDGET_THEME", - enumClass = Theme::class.java, - defaultValue = Theme.DARK - ) { + key = "WIDGET_THEME", + enumClass = Theme::class.java, + defaultValue = Theme.DARK + ) { override fun getDisplayValues(context: Context) = getThemeDisplayValues(context) override fun getCurrentDisplayValue(context: Context) = get(context).getDisplayValue(context) } data object WidgetCalendar : EnumConfigurationItem( - key = "WIDGET_CALENDAR", - enumClass = Calendar::class.java, - defaultValue = Calendar.GREGORIAN - ) { + key = "WIDGET_CALENDAR", + enumClass = Calendar::class.java, + defaultValue = Calendar.GREGORIAN + ) { override fun getDisplayValues(context: Context) = getCalendarDisplayValues(context) override fun getCurrentDisplayValue(context: Context) = get(context).getDisplayValue(context) } data object FirstDayOfWeek : EnumConfigurationItem( - key = "FIRST_DAY_OF_WEEK", - enumClass = DayOfWeek::class.java, - defaultValue = DayOfWeek.MONDAY - ) { + key = "FIRST_DAY_OF_WEEK", + enumClass = DayOfWeek::class.java, + defaultValue = DayOfWeek.MONDAY + ) { override fun getDisplayValues(context: Context) = getDayOfWeekDisplayValues(context) override fun getCurrentDisplayValue(context: Context) = get(context).getDisplayValue(context) } data object InstancesSymbolSet : EnumConfigurationItem( - key = "INSTANCES_SYMBOL_SET", - enumClass = SymbolSet::class.java, - defaultValue = SymbolSet.MINIMAL - ) { + key = "INSTANCES_SYMBOL_SET", + enumClass = SymbolSet::class.java, + defaultValue = SymbolSet.MINIMAL + ) { override fun getDisplayValues(context: Context) = getSymbolSetDisplayValues(context) override fun getCurrentDisplayValue(context: Context) = get(context).getDisplayValue(context) } data object InstancesColour : EnumConfigurationItem( - key = "INSTANCES_COLOUR", - enumClass = Colour::class.java, - defaultValue = getAvailableColors().first() - ) { + key = "INSTANCES_COLOUR", + enumClass = Colour::class.java, + defaultValue = getAvailableColors().first() + ) { override fun getEnumConstants() = getAvailableColors().toTypedArray() override fun getDisplayValues(context: Context) = getColourDisplayValues(context) @@ -155,18 +155,18 @@ sealed class PercentageConfigurationItem( ) data object WidgetTransparency : PercentageConfigurationItem( - key = "WIDGET_TRANSPARENCY", - defaultValue = Transparency(20) - ) { + key = "WIDGET_TRANSPARENCY", + defaultValue = Transparency(20) + ) { override fun get(context: Context) = Transparency( getConfiguration(context).getInt(key, defaultValue.percentage) ) } data object WidgetTextSize : PercentageConfigurationItem( - key = "WIDGET_TEXT_SIZE", - defaultValue = TextSize(40) - ) { + key = "WIDGET_TEXT_SIZE", + defaultValue = TextSize(40) + ) { override fun get(context: Context) = TextSize( getConfiguration(context).getInt(key, defaultValue.percentage) ) diff --git a/app/src/main/kotlin/cat/mvmike/minimalcalendarwidget/domain/intent/ActionableView.kt b/app/src/main/kotlin/cat/mvmike/minimalcalendarwidget/domain/intent/ActionableView.kt index ae47326e..ab5d82cc 100644 --- a/app/src/main/kotlin/cat/mvmike/minimalcalendarwidget/domain/intent/ActionableView.kt +++ b/app/src/main/kotlin/cat/mvmike/minimalcalendarwidget/domain/intent/ActionableView.kt @@ -21,28 +21,28 @@ sealed class ActionableView( ) { data object ConfigurationIcon : ActionableView( - viewId = R.id.configuration_icon, - code = 90, - action = "$MINCAL_INTENT_ACTION.configuration_icon_click" - ) + viewId = R.id.configuration_icon, + code = 90, + action = "$MINCAL_INTENT_ACTION.configuration_icon_click" + ) data object MonthAndYearHeader : ActionableView( - viewId = R.id.month_and_year_header, - code = 91, - action = "$MINCAL_INTENT_ACTION.month_and_year_header_click" - ) + viewId = R.id.month_and_year_header, + code = 91, + action = "$MINCAL_INTENT_ACTION.month_and_year_header_click" + ) data object RowHeader : ActionableView( - viewId = R.id.row_header, - code = 92, - action = "$MINCAL_INTENT_ACTION.row_header_click" - ) + viewId = R.id.row_header, + code = 92, + action = "$MINCAL_INTENT_ACTION.row_header_click" + ) data object CellDay : ActionableView( - viewId = R.id.cell_day, - code = 93, - action = "$MINCAL_INTENT_ACTION.cell_day_click" - ) { + viewId = R.id.cell_day, + code = 93, + action = "$MINCAL_INTENT_ACTION.cell_day_click" + ) { private const val CELL_DAY_INTENT_EXTRA_NAME = "startOfDayInEpochSeconds"