We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5dac3d9 commit 8d0b855Copy full SHA for 8d0b855
maps-compose-widgets/src/main/java/com/google/maps/android/compose/widgets/ScaleBar.kt
@@ -213,14 +213,11 @@ public fun DisappearingScaleBar(
213
}
214
215
LaunchedEffect(key1 = cameraPositionState.position.zoom) {
216
- if (visible.isIdle && !visible.currentState) {
217
- // Show ScaleBar
218
- visible.targetState = true
219
- } else if (visible.isIdle && visible.currentState) {
220
- // Hide ScaleBar after timeout period
221
- delay(visibilityDurationMillis.toLong())
222
- visible.targetState = false
223
- }
+ // Show ScaleBar
+ visible.targetState = true
+ delay(visibilityDurationMillis.toLong())
+ // Hide ScaleBar after timeout period
+ visible.targetState = false
224
225
226
AnimatedVisibility(
0 commit comments