Enable isCommentFieldRequired API in android

This commit is contained in:
DevHossamHassan 2017-06-19 23:47:10 +02:00
parent c37b567209
commit a627d12031
2 changed files with 11 additions and 1 deletions

View File

@ -689,6 +689,17 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
mInstabug.setEmailFieldRequired(isEmailFieldRequired);
}
/**
* Sets whether users are required to enter a comment or not when sending reports.
* Defaults to NO.
* @param {boolean} isCommentFieldRequired A boolean to indicate whether comment
* field is required or not.
*/
@ReactMethod
public void setCommentFieldRequired(boolean isCommentFieldRequired) {
mInstabug.setCommentFieldRequired(isCommentFieldRequired);
}
private Locale getLocaleByKey(String instabugLocale) {
String localeInLowerCase = instabugLocale.toLowerCase();
switch (localeInLowerCase) {

View File

@ -247,7 +247,6 @@ module.exports = {
* field is required or not.
*/
setCommentFieldRequired: function (isCommentFieldRequired) {
if (Platform.OS === 'ios')
Instabug.setCommentFieldRequired(isCommentFieldRequired);
},