From 10f4772551eda88522f86e4515f2db633a02e564 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Tue, 21 Jan 2025 18:58:13 -0800 Subject: [PATCH] Migrate SelectionWatcher to Kotlin (#48747) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48747 Migrate SelectionWatcher to Kotlin changelog: [internal] internal Reviewed By: tdn120, cortinico Differential Revision: D68284145 fbshipit-source-id: 40b7d00fe0be75c5387a169038b1c58a048ac88a --- .../{SelectionWatcher.java => SelectionWatcher.kt} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/{SelectionWatcher.java => SelectionWatcher.kt} (73%) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/SelectionWatcher.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/SelectionWatcher.kt similarity index 73% rename from packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/SelectionWatcher.java rename to packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/SelectionWatcher.kt index 1a004bde3f4..f974ca24122 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/SelectionWatcher.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/SelectionWatcher.kt @@ -5,12 +5,12 @@ * LICENSE file in the root directory of this source tree. */ -package com.facebook.react.views.textinput; +package com.facebook.react.views.textinput /** * Implement this interface to be informed of selection changes in the ReactTextEdit This is used by * the ReactTextInputManager to forward events from the EditText to JS */ -interface SelectionWatcher { - void onSelectionChanged(int start, int end); +internal interface SelectionWatcher { + fun onSelectionChanged(start: Int, end: Int): Unit }