Skip to content

Commit 421d80e

Browse files
fix: sending params if we have wv
1 parent 4c56262 commit 421d80e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

CountlyFeedbackWidget.m

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,7 @@ - (void)presentWithAppearBlock:(void(^ __nullable)(void))appearBlock andDismissB
6969
}
7070
};
7171

72-
if (self.widgetVersion) {
73-
[self presentWidget_new:widgetCallback];
74-
} else {
75-
[self presentWithCallback:widgetCallback];
76-
}
77-
72+
[self presentWithCallback:widgetCallback];
7873
}
7974

8075
- (void)presentWidget_new:(WidgetCallback) widgetCallback;
@@ -112,8 +107,8 @@ - (void)presentWithCallback:(WidgetCallback) widgetCallback;
112107
CLY_LOG_I(@"%s %@", __FUNCTION__, widgetCallback);
113108
if (!CountlyConsentManager.sharedInstance.consentForFeedback)
114109
return;
115-
116-
if (self.widgetVersion) {
110+
111+
if (self.widgetVersion && ![self.widgetVersion isKindOfClass:[NSNull class]]) {
117112
[self presentWidget_new:widgetCallback];
118113
return;
119114
}
@@ -280,7 +275,12 @@ - (NSURL *)generateWidgetURL {
280275
[URL appendFormat:@"?%@", queryString];
281276

282277
// Create custom parameters
283-
NSDictionary *customParams = @{@"tc": @"1", @"rw": @"1", @"xb": @"1"};
278+
NSMutableDictionary *customParams = [@{@"tc": @"1"} mutableCopy];
279+
280+
if (self.widgetVersion && ![self.widgetVersion isKindOfClass:[NSNull class]]) {
281+
customParams[@"rw"] = @"1";
282+
customParams[@"xb"] = @"1";
283+
}
284284

285285
// Create JSON data from custom parameters
286286
NSError *error;

0 commit comments

Comments
 (0)