From 2e71e3cb3114f532e37b20fdff17a4b91bcc3480 Mon Sep 17 00:00:00 2001 From: Rafael Escaleira Date: Mon, 7 Oct 2024 12:52:44 -0400 Subject: [PATCH] Update RefdsViewController.swift --- Sources/RefdsShared/Application/RefdsViewController.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/RefdsShared/Application/RefdsViewController.swift b/Sources/RefdsShared/Application/RefdsViewController.swift index 4605c69..f72dd94 100644 --- a/Sources/RefdsShared/Application/RefdsViewController.swift +++ b/Sources/RefdsShared/Application/RefdsViewController.swift @@ -5,7 +5,7 @@ import AppKit import UIKit #endif -public protocol RefdsViewControllerProtocol { +public protocol RefdsViewControllerProtocol: Sendable { func present(_ viewController: RefdsViewController?) async } @@ -19,12 +19,12 @@ public class RefdsViewController: NSViewController, RefdsViewControllerProtocol public extension NSViewController { var refdsViewController: RefdsViewController? { - self as? RefdsViewController + get async { self as? RefdsViewController } } } #else public class RefdsViewController: UIViewController, RefdsViewControllerProtocol { - public func present(_ viewController: RefdsViewController?) { + public func present(_ viewController: RefdsViewController?) async { guard let viewController = viewController else { return } self.present(viewController, animated: true) } @@ -32,7 +32,7 @@ public class RefdsViewController: UIViewController, RefdsViewControllerProtocol public extension UIViewController { var refdsViewController: RefdsViewController? { - self as? RefdsViewController + get async { self as? RefdsViewController } } } #endif