mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Convert FakeRCTEventEmitter to Kotlin (#37733)
Summary: Converts FakeRCTEventEmitter from Java to Kotlin, as per issue https://github.com/facebook/react-native/issues/37708 ## Changelog: [Internal] [Changed] - Convert FakeRCTEventEmitter to Kotlin Pull Request resolved: https://github.com/facebook/react-native/pull/37733 Test Plan: Tests pass: `./gradlew :packages:react-native:ReactAndroid:test` Formatted with [KtFmt](https://facebook.github.io/ktfmt/) Reviewed By: rshest Differential Revision: D46513891 Pulled By: cortinico fbshipit-source-id: 4ad70242d88cc89f8f8033fd437d43df2283c4a1
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ecfbabf532
commit
e4497067a9
-23
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.bridge.interop;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.WritableArray;
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
import com.facebook.react.uimanager.events.RCTEventEmitter;
|
||||
|
||||
public class FakeRCTEventEmitter implements RCTEventEmitter {
|
||||
|
||||
@Override
|
||||
public void receiveEvent(int targetReactTag, String eventName, @Nullable WritableMap event) {}
|
||||
|
||||
@Override
|
||||
public void receiveTouches(
|
||||
String eventName, WritableArray touches, WritableArray changedIndices) {}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.bridge.interop
|
||||
|
||||
import com.facebook.react.bridge.WritableArray
|
||||
import com.facebook.react.bridge.WritableMap
|
||||
import com.facebook.react.uimanager.events.RCTEventEmitter
|
||||
|
||||
class FakeRCTEventEmitter : RCTEventEmitter {
|
||||
|
||||
override fun receiveEvent(targetReactTag: Int, eventName: String, event: WritableMap?) {}
|
||||
|
||||
override fun receiveTouches(
|
||||
eventName: String,
|
||||
touches: WritableArray,
|
||||
changedIndices: WritableArray
|
||||
) {}
|
||||
}
|
||||
Reference in New Issue
Block a user