Skip to content

Commit 5c05f53

Browse files
committed
🎨 Improve structure of the code, by adding the send event method to the end of the file.
1 parent a455a93 commit 5c05f53

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,13 +1015,6 @@ public void setIntroMessageEnabled(boolean enabled) {
10151015
e.printStackTrace();
10161016
}
10171017
}
1018-
private void sendEvent(ReactApplicationContext reactContext,
1019-
String eventName,
1020-
@Nullable WritableMap params) {
1021-
reactContext
1022-
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
1023-
.emit(eventName, params);
1024-
}
10251018

10261019
/**
10271020
* Sets the runnable that gets executed just before showing any valid survey<br/>
@@ -1246,6 +1239,14 @@ private Locale getLocaleByKey(String instabugLocale) {
12461239
}
12471240
}
12481241

1242+
private void sendEvent(ReactApplicationContext reactContext,
1243+
String eventName,
1244+
@Nullable WritableMap params) {
1245+
reactContext
1246+
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
1247+
.emit(eventName, params);
1248+
}
1249+
12491250
@Override
12501251
public Map<String, Object> getConstants() {
12511252
final Map<String, Object> constants = new HashMap<>();

0 commit comments

Comments
 (0)