summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2023-04-28 13:51:12 +0200
committerAndrej Mihajlov <and@mullvad.net>2023-04-28 13:53:42 +0200
commit5721afcd758de07c7afd59f53cfe90cdcaaf1a67 (patch)
tree6f618e9d1d922ed896f7894a56a2fcf67030471d
parent93ef96a63245b181af3e48b3b7fe77fc32b7a293 (diff)
downloadmullvadvpn-5721afcd758de07c7afd59f53cfe90cdcaaf1a67.tar.xz
mullvadvpn-5721afcd758de07c7afd59f53cfe90cdcaaf1a67.zip
Rename actionHandler to action
-rw-r--r--ios/MullvadVPN/Notifications/UI/NotificationBannerView.swift6
-rw-r--r--ios/MullvadVPN/Notifications/UI/NotificationController.swift2
2 files changed, 4 insertions, 4 deletions
diff --git a/ios/MullvadVPN/Notifications/UI/NotificationBannerView.swift b/ios/MullvadVPN/Notifications/UI/NotificationBannerView.swift
index 776195a85c..8cb974b244 100644
--- a/ios/MullvadVPN/Notifications/UI/NotificationBannerView.swift
+++ b/ios/MullvadVPN/Notifications/UI/NotificationBannerView.swift
@@ -88,9 +88,9 @@ final class NotificationBannerView: UIView {
}
}
- var actionHandler: InAppNotificationAction? {
+ var action: InAppNotificationAction? {
didSet {
- actionButton.setImage(actionHandler?.type.image, for: .normal)
+ actionButton.setImage(action?.image, for: .normal)
actionButton.addTarget(self, action: #selector(didPress), for: .touchUpInside)
}
}
@@ -149,7 +149,7 @@ final class NotificationBannerView: UIView {
}
@objc private func didPress() {
- actionHandler?.handler?()
+ action?.handler?()
}
}
diff --git a/ios/MullvadVPN/Notifications/UI/NotificationController.swift b/ios/MullvadVPN/Notifications/UI/NotificationController.swift
index 888c4ef497..4825fa689b 100644
--- a/ios/MullvadVPN/Notifications/UI/NotificationController.swift
+++ b/ios/MullvadVPN/Notifications/UI/NotificationController.swift
@@ -105,7 +105,7 @@ final class NotificationController: UIViewController {
bannerView.title = notification.title
bannerView.body = notification.body
bannerView.style = notification.style
- bannerView.actionHandler = notification.action
+ bannerView.action = notification.action
bannerView.accessibilityLabel = "\(notification.title)\n\(notification.body.string)"
if animated {