diff --git a/MVMCoreUI/TopAlert/MVMCoreUITopAlertView+Extension.swift b/MVMCoreUI/TopAlert/MVMCoreUITopAlertView+Extension.swift index 027875e7..e6df7178 100644 --- a/MVMCoreUI/TopAlert/MVMCoreUITopAlertView+Extension.swift +++ b/MVMCoreUI/TopAlert/MVMCoreUITopAlertView+Extension.swift @@ -23,8 +23,8 @@ public extension MVMCoreUITopAlertView { /// Checks for new top alert json @objc func responseJSONUpdated(notification: Notification) { - let responseJSON = (notification.userInfo?[String(describing: MVMCoreLoadObject.self)] as? MVMCoreLoadObject)?.responseJSON - guard let json = responseJSON?.optionalDictionaryForKey("TopNotification") else { return } + guard let responseJSON = (notification.userInfo?[String(describing: MVMCoreLoadObject.self)] as? MVMCoreLoadObject)?.responseJSON, + let json = responseJSON.optionalDictionaryForKey("TopNotification") else { return } // TODO: Top alert view is current delegate. Should move to current view controller eventually? let delegateObject = MVMCoreUIDelegateObject.create(withDelegateForAll: self) @@ -65,10 +65,10 @@ public extension MVMCoreUITopAlertView { let view = molecule as? MVMCoreUITopAlertBaseView else { throw ModelRegistry.Error.decoderOther(message: "Molecule not a top alert") } - if let casteView = view as? StatusBarUI { - let statusBarUI = casteView.getStatusBarUI() - statusBarColor?.pointee = statusBarUI.color - statusBarStyle?.pointee = statusBarUI.style + if let castView = view as? StatusBarUI { + let (color, style) = castView.getStatusBarUI() + statusBarColor?.pointee = color + statusBarStyle?.pointee = style } return view } catch {