diff --git a/MVMCoreUI/Alerts/AlertOperation.swift b/MVMCoreUI/Alerts/AlertOperation.swift index bacc437e..0c96b492 100644 --- a/MVMCoreUI/Alerts/AlertOperation.swift +++ b/MVMCoreUI/Alerts/AlertOperation.swift @@ -27,14 +27,10 @@ public class AlertOperation: MVMCoreOperation { public let alertController: AlertController - private var alDescription: String = "" - - public let alertObject: AlertObject /// For tracking isVisible changes of the alert controller. private var cancellable: Cancellable? - /// Blocks the navigation queue to ensure no other navigation happens while an alert is displayed. private var blockingOperation: MVMCoreOperation? @@ -58,8 +54,6 @@ public class AlertOperation: MVMCoreOperation { // Observe for when it is removed. observeForCurrentAlertViewDismissal() - print("---\nTTTTTT alertOperation present: \(self.description)\ncontroller:\(self.alDescription)\nobject: \(alertObject.alertModel.id)\n---") - // Adds the presentation to the animation queue. let blockingOperation = MVMCoreOperation() self.blockingOperation = blockingOperation @@ -88,8 +82,6 @@ public class AlertOperation: MVMCoreOperation { } public override func cancel() { - print("---\nTTTTTT alertOperation cancelled: \(self.description)\ncontroller: \(self.alDescription)\nobject: \(self.alertObject.alertModel.id)\n---") - super.cancel() Task { @MainActor in self.alertObject.alertDelegate?.alertCancelled(self.alertController) @@ -101,11 +93,7 @@ public class AlertOperation: MVMCoreOperation { guard await properties.getIsDisplayed() else { return } await withCheckedContinuation { continuation in Task { @MainActor in - print("---\nTTTTTT alertOperation beginDismiss: \(self.description)\ncontroller: \(self.alDescription)\nobject: \(self.alertObject.alertModel.id)\n---") - MVMCoreNavigationHandler.shared()?.dismiss(alertController, animated: true, delegate: nil) { - print("---\nTTTTTT alertOperation endDismiss: \(self.description)\ncontroller: \(self.alDescription)\nobject: \(self.alertObject.alertModel.id)\n---") - continuation.resume() } } @@ -128,12 +116,8 @@ public class AlertOperation: MVMCoreOperation { await self.properties.set(displayed: visible) Task { @MainActor in if visible { - print("---\nTTTTTT alertOperation visible true: \(self.description)\ncontroller:\(self.alDescription)\nobject: \(self.alertObject.alertModel.id)\n---") - self.alertObject.alertDelegate?.alertShown(self.alertController) } else { - print("---\nTTTTTT alertOperation visible false: \(self.description)\ncontroller:\(self.alDescription)\nobject: \(self.alertObject.alertModel.id)\n---") - self.alertObject.alertDelegate?.alertDismissed(self.alertController) // Is visible was set to NO, meaning that the alertview is no longer visible.