diff --git a/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/viewinterop/UIKitInteropInteractionMode.uikit.kt b/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/viewinterop/UIKitInteropInteractionMode.uikit.kt index 7b805170fe804..70b4389fc3cad 100644 --- a/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/viewinterop/UIKitInteropInteractionMode.uikit.kt +++ b/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/viewinterop/UIKitInteropInteractionMode.uikit.kt @@ -45,28 +45,28 @@ sealed interface UIKitInteropInteractionMode { * This mode is useful when the interop view is inside a scrollable container and the user might * want to scroll the container despite the first touch being landed on the interop view. * - * @property delayMs Indicates how much time in milliseconds is given for Compose to intercept - * the touches before delivering them to the interop view. The default value is [DefaultDelayMs]. + * @property delayMillis Indicates how much time in milliseconds is given for Compose to intercept + * the touches before delivering them to the interop view. The default value is [DefaultDelayMillis]. */ @ExperimentalComposeUiApi class Cooperative( - val delayMs: Int = DefaultDelayMs + val delayMillis: Int = DefaultDelayMillis ) : UIKitInteropInteractionMode { init { - require(delayMs > 0) { "Delay must be a positive value" } + require(delayMillis > 0) { "Delay must be a positive value" } } override fun equals(other: Any?): Boolean { if (this === other) return true if (other !is Cooperative) return false - if (delayMs != other.delayMs) return false + if (delayMillis != other.delayMillis) return false return true } override fun hashCode(): Int { - return delayMs.hashCode() + return delayMillis.hashCode() } companion object { @@ -74,7 +74,7 @@ sealed interface UIKitInteropInteractionMode { * The default delay in milliseconds before the touch is delivered to the interop view. * Same as the default delay in [UIScrollView]. */ - const val DefaultDelayMs = 150 + const val DefaultDelayMillis = 150 } } } \ No newline at end of file diff --git a/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/InteractionUIView.uikit.kt b/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/InteractionUIView.uikit.kt index 40e9a60f76df8..102a460930fb5 100644 --- a/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/InteractionUIView.uikit.kt +++ b/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/InteractionUIView.uikit.kt @@ -107,13 +107,13 @@ private sealed interface InteractionUIViewHitTestResult { data object NonCooperativeChildView : InteractionUIViewHitTestResult /** - * Hit test result is Cooperative child view, that allows a delay of [delayInMilliseconds] milliseconds. + * Hit test result is Cooperative child view, that allows a delay of [delayMillis] milliseconds. */ class CooperativeChildView( - val delayInMilliseconds: Int + val delayMillis: Int ) : InteractionUIViewHitTestResult { - val delayInSeconds: Double - get() = delayInMilliseconds.toDouble() / 1000.0 + val delaySeconds: Double + get() = delayMillis.toDouble() / 1000.0 } } @@ -272,7 +272,7 @@ private class GestureRecognizerHandlerImpl( when (val cooperativeChildView = hitTestResult) { is InteractionUIViewHitTestResult.CooperativeChildView -> gestureRecognizer?.scheduleFailure( - cooperativeChildView.delayInSeconds + cooperativeChildView.delaySeconds ) else -> {} } @@ -608,7 +608,7 @@ internal class InteractionUIView( when (interactionMode) { is UIKitInteropInteractionMode.Cooperative -> { InteractionUIViewHitTestResult.CooperativeChildView( - delayInMilliseconds = interactionMode.delayMs + delayMillis = interactionMode.delayMillis ) }