Skip to content

Commit 6e98329

Browse files
committed
refactor(ios): format swift code
1 parent 37e69ee commit 6e98329

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

push_ios/ios/Classes/PushHostHandlers.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class PushHostHandlers: NSObject, PUPushHostApi {
127127
// App in background or terminated
128128
let message = PURemoteMessage.from(userInfo: userInfo)
129129
if application.applicationState == .background || application.applicationState == .inactive {
130-
pushFlutterApi.onBackgroundMessageMessage(message) { _ in
130+
pushFlutterApi.onBackgroundMessageMessage(message) { _ in
131131
completionHandler(.newData)
132132
}
133133
} else { // App in foreground
@@ -136,7 +136,7 @@ class PushHostHandlers: NSObject, PUPushHostApi {
136136
// if "alert" APNs message, it is already sent in UserNotificationCenterDelegateHandlers userNotificationCenter_willPresent
137137
if !isAlertMessage {
138138
// If "background" APNs message (it doesn't contain alert), we need to send it to onMessage.
139-
pushFlutterApi.onMessageMessage(message) { _ in
139+
pushFlutterApi.onMessageMessage(message) { _ in
140140
completionHandler(.newData)
141141
}
142142
} else {

push_ios/ios/Classes/UserNotificationCenterDelegateHandlers.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ class UserNotificationCenterDelegateHandlers: NSObject, UNUserNotificationCenter
2828
}
2929
}
3030

31-
private var userTappedOnNotificationCount = 0;
31+
private var userTappedOnNotificationCount = 0
3232
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
3333
// Prevents sending notification to users twice when their app is launched by a tap.
3434
// We will send that one when the user requests for the "Push.instance.notificationTapWhichLaunchedAppFromTerminated" (Dart code)
3535
let skip = userTappedOnNotificationCount == 0 && PushHostHandlers.notificationTapWhichLaunchedAppUserInfo != nil
36-
if (!skip) {
36+
if !skip {
3737
pushFlutterApi.onNotificationTapData(response.notification.request.content.userInfo as! [String: Any]) { _ in }
3838
}
3939

40-
userTappedOnNotificationCount += 1;
40+
userTappedOnNotificationCount += 1
4141
callOriginalDidReceiveDelegateMethod(center: center, response: response, completionHandler: completionHandler)
4242
}
4343

0 commit comments

Comments
 (0)