File tree 1 file changed +9
-0
lines changed
reveal-core/src/commonMain/kotlin/com/svenjacobs/reveal 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
5
5
import androidx.compose.foundation.layout.Box
6
6
import androidx.compose.foundation.layout.fillMaxSize
7
7
import androidx.compose.runtime.Composable
8
+ import androidx.compose.runtime.DisposableEffect
8
9
import androidx.compose.runtime.LaunchedEffect
9
10
import androidx.compose.runtime.derivedStateOf
10
11
import androidx.compose.runtime.getValue
@@ -158,6 +159,14 @@ public fun Reveal(
158
159
}
159
160
}
160
161
}
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
+ }
161
170
}
162
171
163
172
public typealias OnClickListener = (key: Key ) -> Unit
You can’t perform that action at this time.
0 commit comments