diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/Preference.kt b/app/src/main/java/eu/kanade/presentation/more/settings/Preference.kt index b67595aae5..6680a16e07 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/Preference.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/Preference.kt @@ -51,7 +51,7 @@ sealed class Preference { val value: Int, val min: Int = 0, val max: Int, - val steps: Int = 0, + val steps: Int? = null, override val title: String = "", override val subtitle: String? = null, override val icon: ImageVector? = null, diff --git a/presentation-core/src/main/java/tachiyomi/presentation/core/components/SettingsItems.kt b/presentation-core/src/main/java/tachiyomi/presentation/core/components/SettingsItems.kt index bcc551d72c..1f994f1fd5 100644 --- a/presentation-core/src/main/java/tachiyomi/presentation/core/components/SettingsItems.kt +++ b/presentation-core/src/main/java/tachiyomi/presentation/core/components/SettingsItems.kt @@ -161,7 +161,7 @@ fun SliderItem( onChange: (Int) -> Unit, max: Int, min: Int = 0, - steps: Int = 0, + steps: Int? = null, ) { val haptic = LocalHapticFeedback.current @@ -194,7 +194,7 @@ fun SliderItem( }, modifier = Modifier.weight(1.5f), valueRange = min.toFloat()..max.toFloat(), - steps = if (steps > 0) steps else max - min, + steps = steps ?: (max - min), ) } }