diff --git a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java index 46e6a28..ea3425e 100644 --- a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java +++ b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java @@ -149,10 +149,9 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { * @param tags */ @ReactMethod - public void addTags(String tags) { + public void appendTags(String tags) { try { String[] result = tags.split(","); - mInstabug.resetTags(); //clear last commit tags mInstabug.addTags(result); } catch (Exception e) { e.printStackTrace(); @@ -692,8 +691,9 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { /** * 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. + * field is required or not. */ @ReactMethod public void setCommentFieldRequired(boolean isCommentFieldRequired) { diff --git a/index.js b/index.js index d5a0624..a87128d 100644 --- a/index.js +++ b/index.js @@ -237,7 +237,7 @@ module.exports = { * field is required or not. */ setEmailFieldRequired: function (isEmailFieldRequired) { - Instabug.setEmailFieldRequired(isEmailFieldRequired); + Instabug.setEmailFieldRequired(isEmailFieldRequired); }, /** @@ -247,7 +247,7 @@ module.exports = { * field is required or not. */ setCommentFieldRequired: function (isCommentFieldRequired) { - Instabug.setCommentFieldRequired(isCommentFieldRequired); + Instabug.setCommentFieldRequired(isCommentFieldRequired); }, /** @@ -329,9 +329,7 @@ module.exports = { * @param {string[]} tags An array of tags to append to current tags. */ appendTags: function (tags) { - if (Platform.OS === 'ios') - Instabug.appendTags(tags); - + Instabug.appendTags(tags); }, /** @@ -352,7 +350,11 @@ module.exports = { * @param {tagsCallback} tagsCallback callback with argument tags of reported feedback, bug or crash. */ getTags: function (tagsCallback) { - Instabug.getTags(tagsCallback); + if (Platform.OS === 'ios') { + Instabug.getTags(tagsCallback); + } else if (Platform.OS === 'android') { + Instabug.getTags(); + } }, /**