From bdb10a687079ca0fd684fcbd31f729c84a9cfc51 Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Thu, 21 Dec 2023 18:45:05 +0100 Subject: [PATCH] Update core/designsystem/src/main/kotlin/com/google/samples/apps/nowinandroid/core/designsystem/component/scrollbar/ScrollbarExt.kt Co-authored-by: Don Turner --- .../core/designsystem/component/scrollbar/ScrollbarExt.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/designsystem/src/main/kotlin/com/google/samples/apps/nowinandroid/core/designsystem/component/scrollbar/ScrollbarExt.kt b/core/designsystem/src/main/kotlin/com/google/samples/apps/nowinandroid/core/designsystem/component/scrollbar/ScrollbarExt.kt index 76fab08d0..3fcc8f2c0 100644 --- a/core/designsystem/src/main/kotlin/com/google/samples/apps/nowinandroid/core/designsystem/component/scrollbar/ScrollbarExt.kt +++ b/core/designsystem/src/main/kotlin/com/google/samples/apps/nowinandroid/core/designsystem/component/scrollbar/ScrollbarExt.kt @@ -231,4 +231,4 @@ fun LazyStaggeredGridState.scrollbarState( } private inline fun List.floatSumOf(selector: (T) -> Float): Float = - fold(0f) { acc, it -> acc + selector(it) } + fold(initial = 0f) { accumulator, listItem -> accumulator + selector(listItem) }