summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2023-04-27 14:25:15 +0200
committerAndrej Mihajlov <and@mullvad.net>2023-04-28 16:45:21 +0200
commit0d82f7183a2895918ef927e93d3f676cb5aaaac8 (patch)
tree36793e8a456fe6ac63931a395d27720f216dfe81
parent7ab93f36b3da06f7ffa84d20dd656e1bef7943cb (diff)
downloadmullvadvpn-0d82f7183a2895918ef927e93d3f676cb5aaaac8.tar.xz
mullvadvpn-0d82f7183a2895918ef927e93d3f676cb5aaaac8.zip
Refactor notification manager code a bit
-rw-r--r--ios/MullvadVPN/Notifications/NotificationManager.swift15
1 files changed, 6 insertions, 9 deletions
diff --git a/ios/MullvadVPN/Notifications/NotificationManager.swift b/ios/MullvadVPN/Notifications/NotificationManager.swift
index 6536ae09fc..68c251e9c7 100644
--- a/ios/MullvadVPN/Notifications/NotificationManager.swift
+++ b/ios/MullvadVPN/Notifications/NotificationManager.swift
@@ -96,15 +96,12 @@ final class NotificationManager: NotificationProviderDelegate {
for newRequest in newSystemNotificationRequests {
notificationCenter.add(newRequest) { error in
- if let error = error {
- self.logger.error(
- error: error,
- message: """
- Failed to add notification request with identifier \
- \(newRequest.identifier).
- """
- )
- }
+ guard let error = error else { return }
+
+ self.logger.error(
+ error: error,
+ message: "Failed to add notification request with identifier \(newRequest.identifier)."
+ )
}
}
}