From 30924c6c504186171e45c90b316db4431d3a1ee3 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Tue, 22 Sep 2020 09:56:31 -0400 Subject: [PATCH] review comment --- .../TopNotification/CollapsableNotification.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MVMCoreUI/Atomic/Molecules/TopNotification/CollapsableNotification.swift b/MVMCoreUI/Atomic/Molecules/TopNotification/CollapsableNotification.swift index 6c8d84b8..f5181511 100644 --- a/MVMCoreUI/Atomic/Molecules/TopNotification/CollapsableNotification.swift +++ b/MVMCoreUI/Atomic/Molecules/TopNotification/CollapsableNotification.swift @@ -81,11 +81,11 @@ import Foundation let delay: DispatchTimeInterval = DispatchTimeInterval.seconds((model as? CollapsableNotificationModel)?.collapseTime ?? 5) DispatchQueue.main.asyncAfter(deadline: .now() + delay) { [weak self] in // If accessibility focused, delay collapse. - guard let localSelf = self else { return } - if MVMCoreUIUtility.viewContainsAccessiblityFocus(localSelf) { - NotificationCenter.default.addObserver(localSelf, selector: #selector(localSelf.accessibilityFocusChanged(notification:)), name: UIAccessibility.elementFocusedNotification, object: nil) + guard let self = self else { return } + if MVMCoreUIUtility.viewContainsAccessiblityFocus(self) { + NotificationCenter.default.addObserver(self, selector: #selector(self.accessibilityFocusChanged(notification:)), name: UIAccessibility.elementFocusedNotification, object: nil) } else { - localSelf.collapse() + self.collapse() } } } @@ -150,7 +150,7 @@ import Foundation } open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? { - return 96 + return 120 } /// Collapse if focus is no longer on this top alert.