update check for notification handler
This commit is contained in:
parent
07fcca17fc
commit
caab123781
@ -357,15 +357,14 @@ open class NotificationHandler {
|
||||
/// Registers to know when pages change.
|
||||
private func registerForPageChanges() {
|
||||
cancellable = NavigationHandler.shared().onNavigationDidFinish.sink { [weak self] operation in
|
||||
// Update displayable for each top alert operation when page type changes, in top queue priority order.
|
||||
guard let self = self,
|
||||
self.queue.operations.count > 0,
|
||||
let navigationController = operation.navigationType.getNavigationController(),
|
||||
navigationController == MVMCoreUISplitViewController.main()?.navigationController,
|
||||
let viewController = navigationController.viewControllers.last,
|
||||
let traversedController = MVMCoreUIUtility.getViewControllerTraversingManagers(viewController) else { return }
|
||||
let pageType = (traversedController as? MVMCoreViewControllerProtocol)?.pageType
|
||||
guard let self = self else { return }
|
||||
Task {
|
||||
// Update displayable for each top alert operation when page type changes, in top queue priority order.
|
||||
guard self.queue.operations.count > 0,
|
||||
let navigationController = await operation.navigationType.getNavigationController(),
|
||||
await navigationController == MVMCoreUISplitViewController.main()?.navigationController,
|
||||
let viewController = await navigationController.getViewController() else { return }
|
||||
let pageType = (viewController as? MVMCoreViewControllerProtocol)?.pageType
|
||||
self.queue.operations.compactMap {
|
||||
$0 as? NotificationOperation
|
||||
}.sorted {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user