Fix crash on slider

pull/246/head
Koitharu 4 years ago
parent af2adeba13
commit 048efdf59f
No known key found for this signature in database
GPG Key ID: 8E861F8CE6E7CE27

@ -114,7 +114,8 @@ fun <T> RecyclerView.ViewHolder.getItem(clazz: Class<T>): T? {
fun Slider.setValueRounded(newValue: Float) {
val step = stepSize
value = (newValue / step).roundToInt() * step
val roundedValue = (newValue / step).roundToInt() * step
value = roundedValue.coerceIn(valueFrom, valueTo)
}
val RecyclerView.isScrolledToTop: Boolean

Loading…
Cancel
Save