Skip to content

Commit a627d12

Browse files
Enable isCommentFieldRequired API in android
1 parent c37b567 commit a627d12

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,17 @@ public void setEmailFieldRequired(boolean isEmailFieldRequired) {
689689
mInstabug.setEmailFieldRequired(isEmailFieldRequired);
690690
}
691691

692+
/**
693+
* Sets whether users are required to enter a comment or not when sending reports.
694+
* Defaults to NO.
695+
* @param {boolean} isCommentFieldRequired A boolean to indicate whether comment
696+
* field is required or not.
697+
*/
698+
@ReactMethod
699+
public void setCommentFieldRequired(boolean isCommentFieldRequired) {
700+
mInstabug.setCommentFieldRequired(isCommentFieldRequired);
701+
}
702+
692703
private Locale getLocaleByKey(String instabugLocale) {
693704
String localeInLowerCase = instabugLocale.toLowerCase();
694705
switch (localeInLowerCase) {

index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ module.exports = {
247247
* field is required or not.
248248
*/
249249
setCommentFieldRequired: function (isCommentFieldRequired) {
250-
if (Platform.OS === 'ios')
251250
Instabug.setCommentFieldRequired(isCommentFieldRequired);
252251
},
253252

0 commit comments

Comments
 (0)