Skip to content

Commit 14d3483

Browse files
authored
Merge pull request #1553 from DimensionDev/bugfix/dm_crash
refactor key handling in LazyListScope
2 parents 0ed8e24 + 3db189c commit 14d3483

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

compose-ui/src/commonMain/kotlin/dev/dimension/flare/ui/common/PagingStateExt.kt

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ public fun <T : Any> LazyListScope.items(
2727
count = itemCount,
2828
key =
2929
key?.let {
30-
{
31-
this.itemKey {
32-
key(it)
33-
}
30+
this.itemKey {
31+
key(it)
3432
}
3533
},
3634
contentType = {
@@ -77,10 +75,8 @@ public fun <T : Any> LazyListScope.itemsIndexed(
7775
count = itemCount,
7876
key =
7977
key?.let {
80-
{
81-
this.itemKey {
82-
key(it)
83-
}
78+
this.itemKey {
79+
key(it)
8480
}
8581
},
8682
contentType = {
@@ -128,7 +124,7 @@ public fun <T : Any> LazyStaggeredGridScope.items(
128124
key =
129125
key?.let {
130126
{
131-
it(this, it)
127+
key(this, it)
132128
}
133129
},
134130
contentType = {
@@ -171,10 +167,8 @@ public fun <T : Any> LazyStaggeredGridScope.itemsIndexed(
171167
count = itemCount,
172168
key =
173169
key?.let {
174-
{
175-
this.itemKey {
176-
key(it)
177-
}
170+
this.itemKey {
171+
key(it)
178172
}
179173
},
180174
contentType = {

0 commit comments

Comments
 (0)