Skip to content

Commit e781422

Browse files
SalmaAliSalmaAli
authored andcommitted
📝 change all removed methods to deprecated
1 parent 72f04ae commit e781422

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ public void setEmailFieldRequired(boolean isEmailFieldRequired) {
11371137
@ReactMethod
11381138
public void setCommentFieldRequired(boolean isCommentFieldRequired) {
11391139
try {
1140-
Instabug.setCommentFieldRequired(isCommentFieldRequired);
1140+
BugReporting.setInvocationOptions(InvocationOption.COMMENT_FIELD_REQUIRED);
11411141
} catch (java.lang.Exception exception) {
11421142
exception.printStackTrace();
11431143
}
@@ -1532,11 +1532,14 @@ public void run() {
15321532
*/
15331533
@ReactMethod
15341534
public void setSuccessDialogEnabled(boolean enabled) {
1535-
try {
1536-
Instabug.setSuccessDialogEnabled(enabled);
1537-
} catch (Exception e) {
1538-
e.printStackTrace();
1535+
if (enabled) {
1536+
try {
1537+
BugReporting.setInvocationOptions(InvocationOption.DISABLE_POST_SENDING_DIALOG);
1538+
} catch (Exception e) {
1539+
e.printStackTrace();
1540+
}
15391541
}
1542+
15401543
}
15411544

15421545
/**

index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ module.exports = {
298298
},
299299

300300
/**
301-
* Enables/disables screenshot view when reporting a bug/improvement.
301+
* @deprecated Enables/disables screenshot view when reporting a bug/improvement.
302302
* By default, screenshot view is shown when reporting a bug, but not when
303303
* sending feedback.
304304
* @param {boolean} willSkipScreenshotAnnotation sets whether screenshot view is
@@ -362,7 +362,7 @@ module.exports = {
362362
},
363363

364364
/**
365-
* Sets whether users are required to enter an email address or not when
365+
* @deprecated Sets whether users are required to enter an email address or not when
366366
* sending reports.
367367
* Defaults to YES.
368368
* @param {boolean} isEmailFieldRequired A boolean to indicate whether email
@@ -404,7 +404,7 @@ module.exports = {
404404

405405

406406
/**
407-
* Sets whether users are required to enter a comment or not when sending reports.
407+
* @deprecated Sets whether users are required to enter a comment or not when sending reports.
408408
* Defaults to NO.
409409
* @param {boolean} isCommentFieldRequired A boolean to indicate whether comment
410410
* field is required or not.
@@ -1013,6 +1013,8 @@ module.exports = {
10131013
},
10141014

10151015
/**
1016+
* @deprecated
1017+
*
10161018
* @param enabled true to show success dialog after submitting a bug report
10171019
*
10181020
*/

0 commit comments

Comments
 (0)