diff --git a/MVMCoreUI/Atomic/Molecules/TopNotification/CollapsableNotification.swift b/MVMCoreUI/Atomic/Molecules/TopNotification/CollapsableNotification.swift index 359be549..9e11ac02 100644 --- a/MVMCoreUI/Atomic/Molecules/TopNotification/CollapsableNotification.swift +++ b/MVMCoreUI/Atomic/Molecules/TopNotification/CollapsableNotification.swift @@ -81,7 +81,7 @@ import MVMCore } /// Set initial collapse/expand state. - public func initialState() { + open func initialState() { guard let model = model as? CollapsableNotificationModel else { return } topView.isHidden = !model.alwaysShowTopLabel && !model.initiallyCollapsed topView.button.isUserInteractionEnabled = model.initiallyCollapsed @@ -203,7 +203,7 @@ import MVMCore } /// Collapse if focus is no longer on this top alert. - @objc func accessibilityFocusChanged(notification: Notification) { + @objc private func accessibilityFocusChanged(notification: Notification) { if !UIAccessibility.isVoiceOverRunning || ((notification.userInfo?[UIAccessibility.focusedElementUserInfoKey] != nil) && !MVMCoreUIUtility.viewContainsAccessiblityFocus(self)) { NotificationCenter.default.removeObserver(self, name: UIAccessibility.elementFocusedNotification, object: nil) NotificationCenter.default.removeObserver(self, name: UIAccessibility.voiceOverStatusDidChangeNotification, object: nil) diff --git a/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m b/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m index a857add7..045dd0bf 100644 --- a/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m +++ b/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m @@ -1046,8 +1046,9 @@ CGFloat const PanelAnimationDuration = 0.2; /*self.leftPanel.needToUpdateUI = YES; [self.leftPanel.view setNeedsLayout]; [self.leftPanel.view layoutIfNeeded];*/ - if ([self.topAlertView conformsToProtocol:@protocol(MVMCoreViewProtocol)]) - [((UIView *)self.topAlertView) updateView:size.width]; + if ([self.topAlertView conformsToProtocol:@protocol(MVMCoreViewProtocol)]) { + [((UIView *)self.topAlertView) updateView:size.width]; + } }]; } diff --git a/MVMCoreUI/Notification/NotificationHandler.swift b/MVMCoreUI/Notification/NotificationHandler.swift index d79d7ebb..1c20e1e3 100644 --- a/MVMCoreUI/Notification/NotificationHandler.swift +++ b/MVMCoreUI/Notification/NotificationHandler.swift @@ -42,6 +42,7 @@ public class NotificationOperation: MVMCoreOperation { public var isDisplayable: Bool { get { var isDisplayable: Bool = true + // TODO: Causes crash. Check thoughts of reviewer. //displayableQueue.sync { isDisplayable = _isDisplayable //} @@ -321,7 +322,7 @@ open class NotificationHandler { /// Publishes when a notification is shown. public let onNotificationShown = PassthroughSubject<(UIView, NotificationModel), Never>() - /// Publishes when a notification will dismissed. + /// Publishes when a notification will dismiss. public let onNotificationWillDismiss = PassthroughSubject<(UIView, NotificationModel), Never>() /// Publishes when a notification is dismissed. @@ -410,7 +411,7 @@ open class NotificationHandler { reevaluteQueue() } - /// Checks for existing top alert object of same type and updates it. Only happens for molecular top alerts. Returns true if we updated. + /// Checks for existing top alert object of same type and updates it. Returns true if we updated. open func checkAndUpdateExisting(with model: NotificationModel, delegateObject: MVMCoreUIDelegateObject?) -> Bool { for case let operation as NotificationOperation in queue.operations { guard operation.notificationModel.type == model.type else { continue }