remove debug code
This commit is contained in:
parent
67a0ccfbac
commit
33eef9ceb6
@ -27,15 +27,11 @@ public class AlertOperation: MVMCoreOperation {
|
|||||||
|
|
||||||
public let alertController: AlertController
|
public let alertController: AlertController
|
||||||
|
|
||||||
private var alDescription: String = ""
|
|
||||||
|
|
||||||
|
|
||||||
public let alertObject: AlertObject
|
public let alertObject: AlertObject
|
||||||
|
|
||||||
/// For tracking isVisible changes of the alert controller.
|
/// For tracking isVisible changes of the alert controller.
|
||||||
private var cancellable: Cancellable?
|
private var cancellable: Cancellable?
|
||||||
|
|
||||||
|
|
||||||
/// Blocks the navigation queue to ensure no other navigation happens while an alert is displayed.
|
/// Blocks the navigation queue to ensure no other navigation happens while an alert is displayed.
|
||||||
private var blockingOperation: MVMCoreOperation?
|
private var blockingOperation: MVMCoreOperation?
|
||||||
|
|
||||||
@ -58,8 +54,6 @@ public class AlertOperation: MVMCoreOperation {
|
|||||||
// Observe for when it is removed.
|
// Observe for when it is removed.
|
||||||
observeForCurrentAlertViewDismissal()
|
observeForCurrentAlertViewDismissal()
|
||||||
|
|
||||||
print("---\nTTTTTT alertOperation present: \(self.description)\ncontroller:\(self.alDescription)\nobject: \(alertObject.alertModel.id)\n---")
|
|
||||||
|
|
||||||
// Adds the presentation to the animation queue.
|
// Adds the presentation to the animation queue.
|
||||||
let blockingOperation = MVMCoreOperation()
|
let blockingOperation = MVMCoreOperation()
|
||||||
self.blockingOperation = blockingOperation
|
self.blockingOperation = blockingOperation
|
||||||
@ -88,8 +82,6 @@ public class AlertOperation: MVMCoreOperation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override func cancel() {
|
public override func cancel() {
|
||||||
print("---\nTTTTTT alertOperation cancelled: \(self.description)\ncontroller: \(self.alDescription)\nobject: \(self.alertObject.alertModel.id)\n---")
|
|
||||||
|
|
||||||
super.cancel()
|
super.cancel()
|
||||||
Task { @MainActor in
|
Task { @MainActor in
|
||||||
self.alertObject.alertDelegate?.alertCancelled(self.alertController)
|
self.alertObject.alertDelegate?.alertCancelled(self.alertController)
|
||||||
@ -101,11 +93,7 @@ public class AlertOperation: MVMCoreOperation {
|
|||||||
guard await properties.getIsDisplayed() else { return }
|
guard await properties.getIsDisplayed() else { return }
|
||||||
await withCheckedContinuation { continuation in
|
await withCheckedContinuation { continuation in
|
||||||
Task { @MainActor 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) {
|
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()
|
continuation.resume()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -128,12 +116,8 @@ public class AlertOperation: MVMCoreOperation {
|
|||||||
await self.properties.set(displayed: visible)
|
await self.properties.set(displayed: visible)
|
||||||
Task { @MainActor in
|
Task { @MainActor in
|
||||||
if visible {
|
if visible {
|
||||||
print("---\nTTTTTT alertOperation visible true: \(self.description)\ncontroller:\(self.alDescription)\nobject: \(self.alertObject.alertModel.id)\n---")
|
|
||||||
|
|
||||||
self.alertObject.alertDelegate?.alertShown(self.alertController)
|
self.alertObject.alertDelegate?.alertShown(self.alertController)
|
||||||
} else {
|
} else {
|
||||||
print("---\nTTTTTT alertOperation visible false: \(self.description)\ncontroller:\(self.alDescription)\nobject: \(self.alertObject.alertModel.id)\n---")
|
|
||||||
|
|
||||||
self.alertObject.alertDelegate?.alertDismissed(self.alertController)
|
self.alertObject.alertDelegate?.alertDismissed(self.alertController)
|
||||||
|
|
||||||
// Is visible was set to NO, meaning that the alertview is no longer visible.
|
// Is visible was set to NO, meaning that the alertview is no longer visible.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user