-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Expand file tree
/
Copy pathEvents.kt
More file actions
35 lines (26 loc) · 965 Bytes
/
Events.kt
File metadata and controls
35 lines (26 loc) · 965 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package com.reactnativenavigation.react.modal
import com.facebook.react.bridge.Arguments
import com.facebook.react.uimanager.events.Event
import com.facebook.react.uimanager.events.RCTEventEmitter
open class RequestCloseModalEvent(viewTag: Int) : Event<RequestCloseModalEvent>(viewTag) {
companion object{
const val EVENT_NAME = "topRequestClose"
}
override fun getEventName(): String {
return EVENT_NAME
}
override fun dispatch(rctEventEmitter: RCTEventEmitter) {
rctEventEmitter.receiveEvent(viewTag, eventName, Arguments.createMap())
}
}
open class ShowModalEvent(viewTag: Int) : Event<ShowModalEvent>(viewTag) {
companion object{
const val EVENT_NAME = "topShow"
}
override fun getEventName(): String {
return EVENT_NAME
}
override fun dispatch(rctEventEmitter: RCTEventEmitter) {
rctEventEmitter.receiveEvent(viewTag, eventName, Arguments.createMap())
}
}