Skip to content

Commit 374d598

Browse files
committedMar 8, 2024
chore: minor code changes
1 parent d31d800 commit 374d598

File tree

1 file changed

+2
-4
lines changed
  • reveal-core/src/commonMain/kotlin/com/svenjacobs/reveal

1 file changed

+2
-4
lines changed
 

‎reveal-core/src/commonMain/kotlin/com/svenjacobs/reveal/Modifiers.kt

+2-4
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public fun Modifier.revealable(
116116
): Modifier = this.then(
117117
Modifier
118118
.onGloballyPositioned { layoutCoordinates ->
119-
for (key in keys) {
119+
keys.forEach { key ->
120120
state.addRevealable(
121121
Revealable(
122122
key = key,
@@ -134,9 +134,7 @@ public fun Modifier.revealable(
134134
.composed {
135135
DisposableEffect(Unit) {
136136
onDispose {
137-
for (key in keys) {
138-
state.removeRevealable(key)
139-
}
137+
keys.forEach(state::removeRevealable)
140138
}
141139
}
142140
this

0 commit comments

Comments
 (0)