Skip to content

A fully functional Android app built entirely with Kotlin and Jetpack Compose

Update thumbTrackSizePercent calculation for readability

Yuyae8f4537e7c52
diff --git a/core/designsystem/src/main/kotlin/com/google/samples/apps/nowinandroid/core/designsystem/component/scrollbar/Scrollbar.kt b/core/designsystem/src/main/kotlin/com/google/samples/apps/nowinandroid/core/designsystem/component/scrollbar/Scrollbar.kt
index 1e5850f30..8c85e5be5 100644
--- a/core/designsystem/src/main/kotlin/com/google/samples/apps/nowinandroid/core/designsystem/component/scrollbar/Scrollbar.kt
+++ b/core/designsystem/src/main/kotlin/com/google/samples/apps/nowinandroid/core/designsystem/component/scrollbar/Scrollbar.kt
@@ -96,7 +96,7 @@ class ScrollbarState {
* Returns the max distance the thumb can travel as a percentage of total track size
*/
val thumbTrackSizePercent
- get() = 1f - unpackFloat1(packedValue)
+ get() = 1f - thumbSizePercent
}
/**