diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2022-05-19 11:30:36 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2022-05-30 15:00:06 +0200 |
| commit | 3d6a39101d5efd54eed1b8764e244bd5015d86df (patch) | |
| tree | 776131bd530560669af2d58b42306a2204e791b2 /ios | |
| parent | facffb2d1bec483bfe164a0319273256f2cef033 (diff) | |
| download | mullvadvpn-3d6a39101d5efd54eed1b8764e244bd5015d86df.tar.xz mullvadvpn-3d6a39101d5efd54eed1b8764e244bd5015d86df.zip | |
Notifications: abandon hungarian convention in constants
Diffstat (limited to 'ios')
| -rw-r--r-- | ios/MullvadVPN/AppDelegate.swift | 2 | ||||
| -rw-r--r-- | ios/MullvadVPN/Notifications/AccountExpiryNotificationProvider.swift | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/ios/MullvadVPN/AppDelegate.swift b/ios/MullvadVPN/AppDelegate.swift index bba086e75d..286a43a4a4 100644 --- a/ios/MullvadVPN/AppDelegate.swift +++ b/ios/MullvadVPN/AppDelegate.swift @@ -823,7 +823,7 @@ extension AppDelegate: UISplitViewControllerDelegate { extension AppDelegate: UNUserNotificationCenterDelegate { func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) { - if response.notification.request.identifier == kAccountExpiryNotificationIdentifier, + if response.notification.request.identifier == accountExpiryNotificationIdentifier, response.actionIdentifier == UNNotificationDefaultActionIdentifier { rootContainer?.showSettings(navigateTo: .account, animated: true) } diff --git a/ios/MullvadVPN/Notifications/AccountExpiryNotificationProvider.swift b/ios/MullvadVPN/Notifications/AccountExpiryNotificationProvider.swift index c0e89ce1a1..294028f8c1 100644 --- a/ios/MullvadVPN/Notifications/AccountExpiryNotificationProvider.swift +++ b/ios/MullvadVPN/Notifications/AccountExpiryNotificationProvider.swift @@ -9,8 +9,8 @@ import Foundation import UserNotifications -let kAccountExpiryNotificationIdentifier = "net.mullvad.MullvadVPN.AccountExpiryNotification" -let kAccountExpiryDefaultTriggerInterval = 3 +let accountExpiryNotificationIdentifier = "net.mullvad.MullvadVPN.AccountExpiryNotification" +let accountExpiryDefaultTriggerInterval = 3 class AccountExpiryNotificationProvider: NotificationProvider, SystemNotificationProvider, InAppNotificationProvider, AccountObserver { private var accountExpiry: Date? @@ -19,10 +19,10 @@ class AccountExpiryNotificationProvider: NotificationProvider, SystemNotificatio private let triggerInterval: Int override var identifier: String { - return kAccountExpiryNotificationIdentifier + return accountExpiryNotificationIdentifier } - init(triggerInterval: Int = kAccountExpiryDefaultTriggerInterval) { + init(triggerInterval: Int = accountExpiryDefaultTriggerInterval) { self.triggerInterval = triggerInterval super.init() @@ -70,7 +70,7 @@ class AccountExpiryNotificationProvider: NotificationProvider, SystemNotificatio content.sound = UNNotificationSound.default return UNNotificationRequest( - identifier: kAccountExpiryNotificationIdentifier, + identifier: accountExpiryNotificationIdentifier, content: content, trigger: trigger ) |
