Skip to content

Commit 1e735d6

Browse files
committed
✨ Add api method for setSuccessDialogEnabled
1 parent 19cac94 commit 1e735d6

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,6 +1131,19 @@ public void run() {
11311131
}
11321132
}
11331133

1134+
/**
1135+
* @param enabled true to show success dialog after submitting a bug report
1136+
*
1137+
*/
1138+
@ReactMethod
1139+
public void setSuccessDialogEnabled(boolean enabled) {
1140+
try {
1141+
mInstabug.setSuccessDialogEnabled(enabled);
1142+
} catch (Exception e) {
1143+
e.printStackTrace();
1144+
}
1145+
}
1146+
11341147
private InstabugCustomTextPlaceHolder.Key getStringToKeyConstant(String key) {
11351148
switch (key) {
11361149
case SHAKE_HINT:

index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,14 @@ module.exports = {
780780
}
781781
},
782782

783+
/**
784+
* @param enabled true to show success dialog after submitting a bug report
785+
*
786+
*/
787+
setSuccessDialogEnabled: function(enabled) {
788+
Instabug.setSuccessDialogEnabled(enabled);
789+
},
790+
783791
/**
784792
* The event used to invoke the feedback form
785793
* @readonly

ios/RNInstabug/InstabugReactBridge.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ - (dispatch_queue_t)methodQueue {
228228
[Instabug logOut];
229229
}
230230

231-
RCT_EXPORT_METHOD(setPostSendingDialogEnabled:(BOOL)isPostSendingDialogEnabled) {
231+
RCT_EXPORT_METHOD(setSuccessDialogEnabled:(BOOL)isPostSendingDialogEnabled) {
232232
[Instabug setPostSendingDialogEnabled:isPostSendingDialogEnabled];
233233
}
234234

0 commit comments

Comments
 (0)