Fix: final clean up

This commit is contained in:
Rajan Maurya 2025-11-26 19:17:29 +05:30
parent 3293a55701
commit 9f665f4b7a

View File

@ -18,7 +18,10 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.pointer.pointerInput
import kotlin.time.Clock
import kotlin.time.ExperimentalTime
@OptIn(ExperimentalTime::class)
@Composable
fun Modifier.detectInstanceSelectorGesture(
onGestureDetected: () -> Unit,
@ -30,7 +33,7 @@ fun Modifier.detectInstanceSelectorGesture(
return this.pointerInput(Unit) {
detectTapGestures(
onTap = {
val currentTime = System.currentTimeMillis()
val currentTime = Clock.System.now().toEpochMilliseconds()
if (currentTime - lastTapTime > tapTimeoutMs) {
tapCount = 0
}