summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBug Magnet <marco.nikic@mullvad.net>2023-09-22 15:18:56 +0200
committerBug Magnet <marco.nikic@mullvad.net>2023-09-22 15:18:56 +0200
commit56978768b5b696fb4a26614b017c674aec195dc0 (patch)
treee3fc3a484c04f00ca1d7c3e6d0f53687d47dd759
parentab04534123f1dab6c7807d63a4c98fcbda2a24b6 (diff)
parentb85f1b2b4aac6aa433c898330c2f933ea99e0d9d (diff)
downloadmullvadvpn-56978768b5b696fb4a26614b017c674aec195dc0.tar.xz
mullvadvpn-56978768b5b696fb4a26614b017c674aec195dc0.zip
Merge branch 'improve-notification-banner-transitions-ios-155'
-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?()
}
}