We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d31d800 commit 374d598Copy full SHA for 374d598
reveal-core/src/commonMain/kotlin/com/svenjacobs/reveal/Modifiers.kt
@@ -116,7 +116,7 @@ public fun Modifier.revealable(
116
): Modifier = this.then(
117
Modifier
118
.onGloballyPositioned { layoutCoordinates ->
119
- for (key in keys) {
+ keys.forEach { key ->
120
state.addRevealable(
121
Revealable(
122
key = key,
@@ -134,9 +134,7 @@ public fun Modifier.revealable(
134
.composed {
135
DisposableEffect(Unit) {
136
onDispose {
137
138
- state.removeRevealable(key)
139
- }
+ keys.forEach(state::removeRevealable)
140
}
141
142
this
0 commit comments