Skip to content

Commit 07f6f6e

Browse files
feat: if check to feedback widgets completion handlers
1 parent 041578d commit 07f6f6e

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

CountlyFeedbacksInternal.m

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,14 +416,26 @@ - (void)getFeedbackWidgets:(void (^)(NSArray <CountlyFeedbackWidget *> *feedback
416416
if (!CountlyServerConfig.sharedInstance.networkingEnabled)
417417
{
418418
CLY_LOG_D(@"'getFeedbackWidgets' is aborted: SDK Networking is disabled from server config!");
419+
if(completionHandler){
420+
completionHandler(nil, nil);
421+
}
419422
return;
420423
}
421424

422-
if (!CountlyConsentManager.sharedInstance.consentForFeedback)
425+
if (!CountlyConsentManager.sharedInstance.consentForFeedback) {
426+
if(completionHandler){
427+
completionHandler(nil, nil);
428+
}
423429
return;
430+
}
431+
424432

425-
if (CountlyDeviceInfo.sharedInstance.isDeviceIDTemporary)
433+
if (CountlyDeviceInfo.sharedInstance.isDeviceIDTemporary) {
434+
if(completionHandler){
435+
completionHandler(nil, nil);
436+
}
426437
return;
438+
}
427439

428440
NSURLSessionTask* task = [CountlyCommon.sharedInstance.URLSession dataTaskWithRequest:[self feedbacksRequest] completionHandler:^(NSData* data, NSURLResponse* response, NSError* error)
429441
{

0 commit comments

Comments
 (0)