Enable appendTags APIs in android

This commit is contained in:
DevHossamHassan 2017-06-20 00:03:22 +02:00
parent a627d12031
commit 1814b37b85
2 changed files with 11 additions and 9 deletions

View File

@ -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,6 +691,7 @@ 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.
*/

View File

@ -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);
},
/**
@ -352,7 +350,11 @@ module.exports = {
* @param {tagsCallback} tagsCallback callback with argument tags of reported feedback, bug or crash.
*/
getTags: function (tagsCallback) {
if (Platform.OS === 'ios') {
Instabug.getTags(tagsCallback);
} else if (Platform.OS === 'android') {
Instabug.getTags();
}
},
/**