diff --git a/shared/src/commonMain/kotlin/fr/ajaury/gwenedeg/player/ui/PlaybackSpeedBottomSheet.kt b/shared/src/commonMain/kotlin/fr/ajaury/gwenedeg/player/ui/PlaybackSpeedBottomSheet.kt index 5411fe2..df2c278 100644 --- a/shared/src/commonMain/kotlin/fr/ajaury/gwenedeg/player/ui/PlaybackSpeedBottomSheet.kt +++ b/shared/src/commonMain/kotlin/fr/ajaury/gwenedeg/player/ui/PlaybackSpeedBottomSheet.kt @@ -93,10 +93,10 @@ private fun PlaybackSpeedContent( } } -/** Formats a speed multiplier as a short label, e.g. 1.0 → "x1", 0.7 → "x0.7". */ +/** Formats a speed multiplier as a short label, e.g. 1.0 → "x1.0", 0.7 → "x0.7". */ internal fun formatPlaybackSpeed(speed: Float): String { val tenths = (speed * 10).roundToInt() - return if (tenths % 10 == 0) "x${tenths / 10}" else "x${tenths / 10}.${tenths % 10}" + return "x${tenths / 10}.${tenths % 10}" } @Preview diff --git a/shared/src/commonMain/kotlin/fr/ajaury/gwenedeg/preferences/ui/SubtitlePreferencesBottomSheet.kt b/shared/src/commonMain/kotlin/fr/ajaury/gwenedeg/preferences/ui/SubtitlePreferencesBottomSheet.kt index cf498b5..af162c2 100644 --- a/shared/src/commonMain/kotlin/fr/ajaury/gwenedeg/preferences/ui/SubtitlePreferencesBottomSheet.kt +++ b/shared/src/commonMain/kotlin/fr/ajaury/gwenedeg/preferences/ui/SubtitlePreferencesBottomSheet.kt @@ -157,10 +157,10 @@ private fun SubtitleTextSizeControl( } } -/** Formats a text-scale multiplier as a short label, e.g. 1.0 -> "x1", 1.2 -> "x1.2". */ +/** Formats a text-scale multiplier as a short label, e.g. 1.0 -> "x1.0", 1.2 -> "x1.2". */ private fun formatTextScale(scale: Float): String { val tenths = (scale * 10).roundToInt() - return if (tenths % 10 == 0) "x${tenths / 10}" else "x${tenths / 10}.${tenths % 10}" + return "x${tenths / 10}.${tenths % 10}" } @Preview