Skip to content

Commit 33dd6d3

Browse files
committed
Add signature of methods to index.js
1 parent d28fe08 commit 33dd6d3

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

index.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,42 @@ module.exports = {
657657
Instabug.clearAllUserAttributes();
658658
},
659659

660+
setViewHirearchyEnabled: function (viewHirearchyEnabled) {
661+
Instabug.setViewHirearchyEnabled(viewHirearchyEnabled);
662+
},
663+
664+
setSurveysEnabled: function(surveysEnabled) {
665+
Instabug.setSurveysEnabled(surveysEnabled)
666+
},
667+
668+
showSurveysIfAvailable: function() {
669+
Instabug.showSurveysIfAvailable()
670+
},
671+
672+
setWillShowSurveyHandler: function (willShowSurveyHandler) {
673+
if (Platform.OS === 'ios') {
674+
Instabug.addListener('IBGWillShowSurvey');
675+
NativeAppEventEmitter.addListener(
676+
'IBGWillShowSurvey',
677+
willShowSurveyHandler
678+
);
679+
680+
Instabug.setWillShowSurveyHandler(willShowSurveyHandler);
681+
}
682+
},
683+
684+
setDidDismissSurveyHandler: function (didDismissSurveyHandler) {
685+
if (Platform.OS === 'ios') {
686+
Instabug.addListener('IBGDidDismissSurvey');
687+
NativeAppEventEmitter.addListener(
688+
'IBGDidDismissSurvey',
689+
didDismissSurveyHandler
690+
);
691+
692+
Instabug.setDidDismissSurveyHandler(didDismissSurveyHandler);
693+
}
694+
}
695+
660696
/**
661697
* The event used to invoke the feedback form
662698
* @readonly

0 commit comments

Comments
 (0)