File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
android/src/main/java/com/instabug/reactlibrary Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -636,12 +636,13 @@ public void clearAllUserAttributes() {
636
636
* @param reportCategories the report categories list which is a list of ReportCategory model
637
637
*/
638
638
@ ReactMethod
639
- public void setReportCategories (String ... categoriesTitles ) {
639
+ public void setReportCategories (ReadableArray categoriesTitles ) {
640
640
try {
641
641
ArrayList <ReportCategory > bugCategories = new ArrayList <>();
642
-
643
- for (String category : categoriesTitles ) {
644
- bugCategories .add (ReportCategory .getInstance ().withLabel (category ));
642
+ int size = categoriesTitles != null ? categoriesTitles .size () : 0 ;
643
+ if (size == 0 ) return ;
644
+ for (int i = 0 ; i < size ; i ++) {
645
+ bugCategories .add (ReportCategory .getInstance ().withLabel (categoriesTitles .getString (i )));
645
646
}
646
647
647
648
Instabug .setReportCategories (bugCategories );
Original file line number Diff line number Diff line change @@ -497,7 +497,7 @@ module.exports = {
497
497
* to. Selected category will be shown as a tag on your dashboard.
498
498
* @param {array } titles titles to be shown in the list.
499
499
*/
500
- setReportCategories : function ( titles ) {
500
+ setReportCategories : function ( ... titles ) {
501
501
if ( Platform . OS == 'ios' ) {
502
502
Instabug . setReportCategories ( titles , null ) ;
503
503
} else if ( Platform . OS == 'android' ) {
You can’t perform that action at this time.
0 commit comments