🎨 Improve structure of the code, by adding the send event method to the end of the file.

This commit is contained in:
Salma ElTarzi 2017-08-10 11:23:17 +02:00
parent a455a93802
commit 5c05f53f5d

View File

@ -1015,13 +1015,6 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
e.printStackTrace();
}
}
private void sendEvent(ReactApplicationContext reactContext,
String eventName,
@Nullable WritableMap params) {
reactContext
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
.emit(eventName, params);
}
/**
* Sets the runnable that gets executed just before showing any valid survey<br/>
@ -1246,6 +1239,14 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
}
}
private void sendEvent(ReactApplicationContext reactContext,
String eventName,
@Nullable WritableMap params) {
reactContext
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
.emit(eventName, params);
}
@Override
public Map<String, Object> getConstants() {
final Map<String, Object> constants = new HashMap<>();