Skip to content

Commit e7cbd46

Browse files
committed
formatting
1 parent 2ed2cd5 commit e7cbd46

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

v2/internal/frontend/desktop/darwin/WailsContext.m

+4-10
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ - (void) CheckNotificationAuthorization :(int) channelID {
844844
}
845845
}
846846

847-
- (UNMutableNotificationContent *)createNotificationContentWithTitle:(const char *)title subtitle:(const char *)subtitle body:(const char *)body dataJSON:(const char *)dataJSON error:(NSError **)contentError API_AVAILABLE(macos(10.14)) {
847+
- (UNMutableNotificationContent *)createNotificationContent:(const char *)title subtitle:(const char *)subtitle body:(const char *)body dataJSON:(const char *)dataJSON error:(NSError **)contentError API_AVAILABLE(macos(10.14)) {
848848
NSString *nsTitle = [NSString stringWithUTF8String:title];
849849
NSString *nsSubtitle = subtitle ? [NSString stringWithUTF8String:subtitle] : @"";
850850
NSString *nsBody = [NSString stringWithUTF8String:body];
@@ -884,21 +884,15 @@ - (void) SendNotification:(int)channelID :(const char *)identifier :(const char
884884
NSString *nsIdentifier = [NSString stringWithUTF8String:identifier];
885885

886886
NSError *contentError = nil;
887-
UNMutableNotificationContent *content = [self createNotificationContentWithTitle:title
888-
subtitle:subtitle
889-
body:body
890-
dataJSON:dataJSON
891-
error:&contentError];
887+
UNMutableNotificationContent *content = [self createNotificationContent:title subtitle:subtitle body:body dataJSON:dataJSON error:&contentError];
892888
if (contentError) {
893889
NSString *errorMsg = [NSString stringWithFormat:@"Error: %@", [contentError localizedDescription]];
894890
captureResult(channelID, false, [errorMsg UTF8String]);
895891
return;
896892
}
897893

898894
UNTimeIntervalNotificationTrigger *trigger = nil;
899-
UNNotificationRequest *request = [UNNotificationRequest requestWithIdentifier:nsIdentifier
900-
content:content
901-
trigger:trigger];
895+
UNNotificationRequest *request = [UNNotificationRequest requestWithIdentifier:nsIdentifier content:content trigger:trigger];
902896

903897
[center addNotificationRequest:request withCompletionHandler:^(NSError * _Nullable error) {
904898
if (error) {
@@ -922,7 +916,7 @@ - (void) SendNotificationWithActions:(int)channelID :(const char *)identifier :(
922916
NSString *nsCategoryId = [NSString stringWithUTF8String:categoryId];
923917

924918
NSError *contentError = nil;
925-
UNMutableNotificationContent *content = [self createNotificationContentWithTitle:title
919+
UNMutableNotificationContent *content = [self createNotificationContent:title
926920
subtitle:subtitle
927921
body:body
928922
dataJSON:dataJSON

0 commit comments

Comments
 (0)