Skip to content

Commit

Permalink
Clang Format
Browse files Browse the repository at this point in the history
  • Loading branch information
Anka authored and Anka committed Oct 22, 2024
1 parent 094f266 commit e577dfb
Showing 1 changed file with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,33 +240,33 @@ - (void)activeUserNotificationRequests:(FlutterResult _Nonnull)result
}];
}


- (void)pendingNotificationRequests:(FlutterResult _Nonnull)result NS_AVAILABLE_IOS(10.0) {
UNUserNotificationCenter *center =
[UNUserNotificationCenter currentNotificationCenter];
[center getPendingNotificationRequestsWithCompletionHandler:^(
NSArray<UNNotificationRequest *> *_Nonnull requests) {
NSMutableArray<NSMutableDictionary<NSString *, NSObject *> *>
*pendingNotificationRequests =
[[NSMutableArray alloc] initWithCapacity:[requests count]];
for (UNNotificationRequest *request in requests) {
NSMutableDictionary *pendingNotificationRequest =
[[NSMutableDictionary alloc] init];
pendingNotificationRequest[ID] =
request.content.userInfo[NOTIFICATION_ID];
if (request.content.title != nil) {
pendingNotificationRequest[TITLE] = request.content.title;
}
if (request.content.body != nil) {
pendingNotificationRequest[BODY] = request.content.body;
}
if (request.content.userInfo[PAYLOAD] != [NSNull null]) {
pendingNotificationRequest[PAYLOAD] = request.content.userInfo[PAYLOAD];
}
[pendingNotificationRequests addObject:pendingNotificationRequest];
- (void)pendingNotificationRequests:(FlutterResult _Nonnull)result
NS_AVAILABLE_IOS(10.0) {
UNUserNotificationCenter *center =
[UNUserNotificationCenter currentNotificationCenter];
[center getPendingNotificationRequestsWithCompletionHandler:^(
NSArray<UNNotificationRequest *> *_Nonnull requests) {
NSMutableArray<NSMutableDictionary<NSString *, NSObject *> *>
*pendingNotificationRequests =
[[NSMutableArray alloc] initWithCapacity:[requests count]];
for (UNNotificationRequest *request in requests) {
NSMutableDictionary *pendingNotificationRequest =
[[NSMutableDictionary alloc] init];
pendingNotificationRequest[ID] =
request.content.userInfo[NOTIFICATION_ID];
if (request.content.title != nil) {
pendingNotificationRequest[TITLE] = request.content.title;
}
result(pendingNotificationRequests);
}];
if (request.content.body != nil) {
pendingNotificationRequest[BODY] = request.content.body;
}
if (request.content.userInfo[PAYLOAD] != [NSNull null]) {
pendingNotificationRequest[PAYLOAD] = request.content.userInfo[PAYLOAD];
}
[pendingNotificationRequests addObject:pendingNotificationRequest];
}
result(pendingNotificationRequests);
}];
}

/// Extracts notification categories from [arguments] and configures them as
Expand Down

0 comments on commit e577dfb

Please sign in to comment.