Skip to content

Commit

Permalink
Spotsless fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
garanj committed Apr 24, 2024
1 parent 207f2f9 commit dbfff68
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ enum class Complication(
RANGED_VALUE("RangedValue"),
SHORT_TEXT("ShortText"),
SMALL_IMAGE("SmallImage"),
WEIGHTED_ELEMENTS("WeightedElements")
WEIGHTED_ELEMENTS("WeightedElements"),
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ class ComplicationToggleReceiver : BroadcastReceiver() {
* Returns the [ComplicationToggleArgs] from the [Intent] sent to the [ComplicationToggleArgs].
*/
private fun Intent.getArgs(): ComplicationToggleArgs = requireNotNull(
BundleCompat.getParcelable(this.extras!!, EXTRA_ARGS, ComplicationToggleArgs::class.java)
BundleCompat.getParcelable(
this.extras!!,
EXTRA_ARGS,
ComplicationToggleArgs::class.java,
),
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class GoalProgressDataSourceService : SuspendingComplicationDataSourceService()
caseContentDescription,
currentValue,
percentage,
case.targetValue
case.targetValue,
),
)
.build()
Expand All @@ -167,6 +167,6 @@ class GoalProgressDataSourceService : SuspendingComplicationDataSourceService()
TEXT_ONLY(5000f),
TEXT_WITH_ICON(2500f),
TEXT_WITH_TITLE(10000f),
ICON_ONLY(10000f)
ICON_ONLY(10000f),
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class WeightedElementsDataSourceService : SuspendingComplicationDataSourceServic
R.string.weighted_elements_content_description,
caseContentDescription,
case.numElements,
resources.getQuantityString(R.plurals.number_of_elements, case.numElements)
resources.getQuantityString(R.plurals.number_of_elements, case.numElements),
),
)
.build()
Expand All @@ -154,7 +154,7 @@ class WeightedElementsDataSourceService : SuspendingComplicationDataSourceServic
.build()
}

private fun createWeightedElements(numElements: Int) :
private fun createWeightedElements(numElements: Int):
List<WeightedElementsComplicationData.Element> {
val elements = mutableListOf<WeightedElementsComplicationData.Element>()
repeat(numElements) { index ->
Expand All @@ -171,12 +171,12 @@ class WeightedElementsDataSourceService : SuspendingComplicationDataSourceServic
TEXT_ONLY(5),
TEXT_WITH_ICON(3),
TEXT_WITH_TITLE(4),
ICON_ONLY(4)
ICON_ONLY(4),
}

private val colors = listOf(
Color.argb(255, 255, 0, 0),
Color.argb(255, 0, 255, 0),
Color.argb(255, 0, 0, 255)
Color.argb(255, 0, 0, 255),
)
}

0 comments on commit dbfff68

Please sign in to comment.