summaryrefslogtreecommitdiffhomepage
path: root/ios
diff options
context:
space:
mode:
Diffstat (limited to 'ios')
-rw-r--r--ios/MullvadVPN/Notifications/UI/NotificationController.swift13
1 files changed, 2 insertions, 11 deletions
diff --git a/ios/MullvadVPN/Notifications/UI/NotificationController.swift b/ios/MullvadVPN/Notifications/UI/NotificationController.swift
index 14c133433b..b29e3d2bae 100644
--- a/ios/MullvadVPN/Notifications/UI/NotificationController.swift
+++ b/ios/MullvadVPN/Notifications/UI/NotificationController.swift
@@ -12,7 +12,6 @@ final class NotificationController: UIViewController {
let bannerView: NotificationBannerView = {
let bannerView = NotificationBannerView()
bannerView.translatesAutoresizingMaskIntoConstraints = false
- bannerView.isHidden = true
bannerView.isAccessibilityElement = true
return bannerView
}()
@@ -63,7 +62,6 @@ final class NotificationController: UIViewController {
// avoid undesired horizontal expansion animation.
view.layoutIfNeeded()
- bannerView.isHidden = false
hideBannerConstraint?.isActive = false
showBannerConstraint?.isActive = true
} else {
@@ -71,13 +69,6 @@ final class NotificationController: UIViewController {
hideBannerConstraint?.isActive = true
}
- let finish = { [weak self] in
- if self?.lastNotification == nil {
- self?.bannerView.isHidden = true
- }
- completion?()
- }
-
if animated {
let timing = UISpringTimingParameters(
dampingRatio: 0.7,
@@ -89,12 +80,12 @@ final class NotificationController: UIViewController {
self.view.layoutIfNeeded()
}
animator.addCompletion { _ in
- finish()
+ completion?()
}
animator.startAnimation()
} else {
view.layoutIfNeeded()
- finish()
+ completion?()
}
}