Merge branch 'bugfix/top_alert_page_switch' into 'release/10_0_2'

Fix top notification check

See merge request BPHV_MIPS/mvm_core_ui!871
This commit is contained in:
Hedden, Kyle Matthew 2022-06-24 17:35:39 +00:00
commit 8caed93f51

View File

@ -52,7 +52,9 @@ public extension MVMCoreAlertHandler {
extension MVMCoreAlertHandler: MVMCorePresentationDelegateProtocol {
// Update displayable for each top alert operation when page type changes, in top queue priority order.
public func navigationController(_ navigationController: UINavigationController, displayedViewController viewController: UIViewController) {
guard navigationController == MVMCoreUISplitViewController.main()?.navigationController else { return }
guard topAlertQueue.operations.count > 0 else { return }
let viewController = MVMCoreUIUtility.getViewControllerTraversingManagers(viewController)
guard viewController == MVMCoreUISplitViewController.main()?.getCurrentViewController() else { return }
let pageType = (viewController as? MVMCoreViewControllerProtocol)?.pageType
topAlertQueue.operations.compactMap {
$0 as? MVMCoreTopAlertOperation