From 33dd6d3ad44789aeba0018a42f4f2666576d044d Mon Sep 17 00:00:00 2001 From: yousefhamza Date: Tue, 20 Jun 2017 16:26:57 +0200 Subject: [PATCH] Add signature of methods to index.js --- index.js | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/index.js b/index.js index 6298503..34bd5fc 100644 --- a/index.js +++ b/index.js @@ -657,6 +657,42 @@ module.exports = { Instabug.clearAllUserAttributes(); }, + setViewHirearchyEnabled: function (viewHirearchyEnabled) { + Instabug.setViewHirearchyEnabled(viewHirearchyEnabled); + }, + + setSurveysEnabled: function(surveysEnabled) { + Instabug.setSurveysEnabled(surveysEnabled) + }, + + showSurveysIfAvailable: function() { + Instabug.showSurveysIfAvailable() + }, + + setWillShowSurveyHandler: function (willShowSurveyHandler) { + if (Platform.OS === 'ios') { + Instabug.addListener('IBGWillShowSurvey'); + NativeAppEventEmitter.addListener( + 'IBGWillShowSurvey', + willShowSurveyHandler + ); + + Instabug.setWillShowSurveyHandler(willShowSurveyHandler); + } + }, + + setDidDismissSurveyHandler: function (didDismissSurveyHandler) { + if (Platform.OS === 'ios') { + Instabug.addListener('IBGDidDismissSurvey'); + NativeAppEventEmitter.addListener( + 'IBGDidDismissSurvey', + didDismissSurveyHandler + ); + + Instabug.setDidDismissSurveyHandler(didDismissSurveyHandler); + } + } + /** * The event used to invoke the feedback form * @readonly