File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
reveal-core/src/commonMain/kotlin/com/svenjacobs/reveal Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import androidx.compose.foundation.gestures.detectTapGestures
55import androidx.compose.foundation.layout.Box
66import androidx.compose.foundation.layout.fillMaxSize
77import androidx.compose.runtime.Composable
8+ import androidx.compose.runtime.DisposableEffect
89import androidx.compose.runtime.LaunchedEffect
910import androidx.compose.runtime.derivedStateOf
1011import androidx.compose.runtime.getValue
@@ -158,6 +159,14 @@ public fun Reveal(
158159 }
159160 }
160161 }
162+
163+ // When the Reveal composable is disposed we need to reset overlayContent or else the effect
164+ // might remain on the screen (issue #196).
165+ DisposableEffect (Unit ) {
166+ onDispose {
167+ revealCanvasState.overlayContent = null
168+ }
169+ }
161170}
162171
163172public typealias OnClickListener = (key: Key ) -> Unit
You can’t perform that action at this time.
0 commit comments