Skip to content

Commit

Permalink
Simplify xpc service acquisition completion handler
Browse files Browse the repository at this point in the history
  • Loading branch information
claucambra committed Jan 23, 2024
1 parent 326cdb0 commit 2ae4692
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/gui/macOS/fileproviderxpc_mac_utils.mm
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,12 @@
completionHandler:^(NSFileProviderService *const service, NSError *const error) {
if (error != nil) {
qCWarning(lcFileProviderXPCUtils) << "Error getting file provider service" << error;
dispatch_group_leave(group);
return;
} else if (service == nil) {
qCWarning(lcFileProviderXPCUtils) << "Service is nil";
dispatch_group_leave(group);
return;
} else {
[service retain];
[fpServices addObject:@{acquiredService.name: acquiredService}];
}

[service retain];
[fpServices addObject:@{acquiredService.name: acquiredService}];
dispatch_group_leave(group);
}];
dispatch_group_wait(group, DISPATCH_TIME_FOREVER);
Expand Down

0 comments on commit 2ae4692

Please sign in to comment.