summaryrefslogtreecommitdiffhomepage
path: root/ios
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2023-05-16 12:03:58 +0200
committerAndrej Mihajlov <and@mullvad.net>2023-05-30 11:17:29 +0200
commitd1c8c19d822f72aa9b0a541582aebecb4595c5f2 (patch)
treee017f4bd07202a276e8c46d5bbf5d196297667d9 /ios
parenta90f516f561b739016b33dc3b3832f34e6c7e951 (diff)
downloadmullvadvpn-d1c8c19d822f72aa9b0a541582aebecb4595c5f2.tar.xz
mullvadvpn-d1c8c19d822f72aa9b0a541582aebecb4595c5f2.zip
NotificationBanner: add target once
Diffstat (limited to 'ios')
-rw-r--r--ios/MullvadVPN/Notifications/UI/NotificationBannerView.swift3
1 files changed, 2 insertions, 1 deletions
diff --git a/ios/MullvadVPN/Notifications/UI/NotificationBannerView.swift b/ios/MullvadVPN/Notifications/UI/NotificationBannerView.swift
index 5562db43fd..8671d48bc2 100644
--- a/ios/MullvadVPN/Notifications/UI/NotificationBannerView.swift
+++ b/ios/MullvadVPN/Notifications/UI/NotificationBannerView.swift
@@ -91,7 +91,6 @@ final class NotificationBannerView: UIView {
var action: InAppNotificationAction? {
didSet {
actionButton.setImage(action?.image, for: .normal)
- actionButton.addTarget(self, action: #selector(didPress), for: .touchUpInside)
}
}
@@ -105,6 +104,8 @@ final class NotificationBannerView: UIView {
backgroundView.contentView.addSubview(wrapperView)
addSubview(backgroundView)
+ actionButton.addTarget(self, action: #selector(didPress), for: .touchUpInside)
+
NSLayoutConstraint.activate([
backgroundView.topAnchor.constraint(equalTo: topAnchor),
backgroundView.leadingAnchor.constraint(equalTo: leadingAnchor),