summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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),