File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,18 @@ module.exports = {
114
114
Instabug . showSurveyWithToken ( surveyToken ) ;
115
115
} ,
116
116
117
+ /**
118
+ * Returns true if the survey with a specific token was answered before.
119
+ * Will return false if the token does not exist or if the survey was not answered before.
120
+ * @param {string } surveyToken - A String with a survey token.
121
+ * @param {function } surveyTokenCallback callback with argument as the desired value of the whether
122
+ * the survey has been responded to or not.
123
+ *
124
+ */
125
+ hasRespondedToSurveyWithToken : function ( surveyToken , surveyTokenCallback ) {
126
+ Instabug . hasRespondedToSurveyWithToken ( surveyToken , surveyTokenCallback ) ;
127
+ } ,
128
+
117
129
/**
118
130
* Sets a block of code to be executed just before the SDK's UI is presented.
119
131
* This block is executed on the UI thread. Could be used for performing any
Original file line number Diff line number Diff line change @@ -65,6 +65,10 @@ - (dispatch_queue_t)methodQueue {
65
65
[Instabug showSurveyWithToken: surveyToken];
66
66
}
67
67
68
+ RCT_EXPORT_METHOD (hasRespondedToSurveyWithToken:(NSString *)surveyToken callback:(RCTResponseSenderBlock)callback) {
69
+ callback (@[@([Instabug hasRespondedToSurveyWithToken: surveyToken])]);
70
+ }
71
+
68
72
RCT_EXPORT_METHOD (setUserStepsEnabled:(BOOL )isUserStepsEnabled) {
69
73
[Instabug setUserStepsEnabled: isUserStepsEnabled];
70
74
}
You can’t perform that action at this time.
0 commit comments