Kotlinify DrawerClosedEvent (#43833)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43833

Changelog: [Internal]

As part of the Sustainability Week (see [post](https://fb.workplace.com/groups/251759413609061/permalink/742797531171911/)).

Reviewed By: alanleedev

Differential Revision: D55709690

fbshipit-source-id: fdfe8fbc8f8faffc3dcde27e03a5f6667f621e46
This commit is contained in:
Fabrizio Cucci
2024-04-04 02:00:36 -07:00
committed by Facebook GitHub Bot
parent bd385f831f
commit c34dfb036b
3 changed files with 34 additions and 41 deletions
@@ -5976,14 +5976,17 @@ public class com/facebook/react/views/drawer/ReactDrawerLayoutManager$DrawerEven
public fun onDrawerStateChanged (I)V
}
public class com/facebook/react/views/drawer/events/DrawerClosedEvent : com/facebook/react/uimanager/events/Event {
public final class com/facebook/react/views/drawer/events/DrawerClosedEvent : com/facebook/react/uimanager/events/Event {
public static final field Companion Lcom/facebook/react/views/drawer/events/DrawerClosedEvent$Companion;
public static final field EVENT_NAME Ljava/lang/String;
public fun <init> (I)V
public fun <init> (II)V
protected fun getEventData ()Lcom/facebook/react/bridge/WritableMap;
public fun getEventName ()Ljava/lang/String;
}
public final class com/facebook/react/views/drawer/events/DrawerClosedEvent$Companion {
}
public final class com/facebook/react/views/drawer/events/DrawerOpenedEvent : com/facebook/react/uimanager/events/Event {
public static final field Companion Lcom/facebook/react/views/drawer/events/DrawerOpenedEvent$Companion;
public static final field EVENT_NAME Ljava/lang/String;
@@ -1,39 +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.views.drawer.events;
import com.facebook.infer.annotation.Nullsafe;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.uimanager.common.ViewUtil;
import com.facebook.react.uimanager.events.Event;
@Nullsafe(Nullsafe.Mode.LOCAL)
public class DrawerClosedEvent extends Event<DrawerClosedEvent> {
public static final String EVENT_NAME = "topDrawerClose";
@Deprecated
public DrawerClosedEvent(int viewId) {
this(ViewUtil.NO_SURFACE_ID, viewId);
}
public DrawerClosedEvent(int surfaceId, int viewId) {
super(surfaceId, viewId);
}
@Override
public String getEventName() {
return EVENT_NAME;
}
@Override
protected WritableMap getEventData() {
return Arguments.createMap();
}
}
@@ -0,0 +1,29 @@
/*
* 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.views.drawer.events
import com.facebook.react.bridge.Arguments
import com.facebook.react.bridge.WritableMap
import com.facebook.react.uimanager.common.ViewUtil
import com.facebook.react.uimanager.events.Event
public class DrawerClosedEvent : Event<DrawerClosedEvent> {
@Deprecated("Use constructor with surfaceId", ReplaceWith("DrawerClosedEvent(surfaceId, viewId)"))
public constructor(viewId: Int) : this(ViewUtil.NO_SURFACE_ID, viewId)
public constructor(surfaceId: Int, viewId: Int) : super(surfaceId, viewId)
override public fun getEventName(): String = EVENT_NAME
override protected fun getEventData(): WritableMap? = Arguments.createMap()
public companion object {
public const val EVENT_NAME: String = "topDrawerClose"
}
}