@@ -909,7 +909,7 @@ public void setPreInvocationHandler(final Callback preInvocationHandler) {
909
909
Runnable preInvocationRunnable = new Runnable () {
910
910
@ Override
911
911
public void run () {
912
- preInvocationHandler . invoke ( );
912
+ sendEvent ( getReactApplicationContext (), "IBGpreInvocationHandler" , null );
913
913
}
914
914
};
915
915
mInstabug .setPreInvocation (preInvocationRunnable );
@@ -933,7 +933,7 @@ public void setPreSendingHandler(final Callback preSendingHandler) {
933
933
Runnable preSendingRunnable = new Runnable () {
934
934
@ Override
935
935
public void run () {
936
- preSendingHandler . invoke ( );
936
+ sendEvent ( getReactApplicationContext (), "IBGpreSendingHandler" , null );
937
937
}
938
938
};
939
939
mInstabug .setPreSendingRunnable (preSendingRunnable );
@@ -957,7 +957,10 @@ public void setPostInvocationHandler(final Callback postInvocationHandler) {
957
957
mInstabug .setOnSdkDismissedCallback (new OnSdkDismissedCallback () {
958
958
@ Override
959
959
public void onSdkDismissed (DismissType issueState , Bug .Type bugType ) {
960
- postInvocationHandler .invoke ();
960
+ WritableMap params = Arguments .createMap ();
961
+ params .putString ("issueState" ,issueState .toString ());
962
+ params .putString ("bugType" ,bugType .toString ());
963
+ sendEvent (getReactApplicationContext (), "IBGpostInvocationHandler" , params );
961
964
}
962
965
});
963
966
@@ -1022,7 +1025,7 @@ public void setWillShowSurveyHandler(final Callback willShowSurveyHandler) {
1022
1025
Runnable willShowSurveyRunnable = new Runnable () {
1023
1026
@ Override
1024
1027
public void run () {
1025
- willShowSurveyHandler . invoke ( );
1028
+ sendEvent ( getReactApplicationContext (), "IBGWillShowSurvey" , null );
1026
1029
}
1027
1030
};
1028
1031
mInstabug .setPreShowingSurveyRunnable (willShowSurveyRunnable );
@@ -1044,7 +1047,7 @@ public void setDidDismissSurveyHandler(final Callback didDismissSurveyHandler) {
1044
1047
Runnable didDismissSurveyRunnable = new Runnable () {
1045
1048
@ Override
1046
1049
public void run () {
1047
- didDismissSurveyHandler . invoke ( );
1050
+ sendEvent ( getReactApplicationContext (), "IBGDidDismissSurvey" , null );
1048
1051
}
1049
1052
};
1050
1053
mInstabug .setAfterShowingSurveyRunnable (didDismissSurveyRunnable );
@@ -1115,7 +1118,7 @@ public void setOnNewMessageHandler(final Callback onNewMessageHandler) {
1115
1118
Runnable onNewMessageRunnable = new Runnable () {
1116
1119
@ Override
1117
1120
public void run () {
1118
- onNewMessageHandler . invoke ( );
1121
+ sendEvent ( getReactApplicationContext (), "IBGonNewMessageHandler" , null );
1119
1122
}
1120
1123
};
1121
1124
mInstabug .setNewMessageHandler (onNewMessageRunnable );
0 commit comments