mirror of
https://github.com/status-im/instabug-reactnative.git
synced 2025-03-03 14:40:54 +00:00
Enable appendTags
APIs in android
This commit is contained in:
parent
a627d12031
commit
1814b37b85
@ -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) {
|
||||
|
14
index.js
14
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();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user