From bcd1b2d3b3524556e8ca3bb5ef25664443ba736a Mon Sep 17 00:00:00 2001 From: "codegen-sh[bot]" <131295404+codegen-sh[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 07:58:33 +0000 Subject: [PATCH] Fix Swift compilation errors in iOS AI Assistant views --- iOS/Views/AI | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/iOS/Views/AI b/iOS/Views/AI index b72dccc..032ba4e 100644 --- a/iOS/Views/AI +++ b/iOS/Views/AI @@ -25,7 +25,7 @@ class ChatViewController: UIViewController, UITableViewDataSource, UITableViewDe stateQueue.sync { _isProcessingMessage = newValue } // Update UI based on processing state - DispatchQueue.main.async { [weak self] in + DispatchQueue.main.async(execute: { [weak self] in if let self = self { self.updateProcessingState(isProcessing: newValue) } @@ -158,7 +158,7 @@ class ChatViewController: UIViewController, UITableViewDataSource, UITableViewDe Debug.shared.log(message: "Chat view controller becoming active after background", type: .debug) // Refresh messages to ensure we're in sync with CoreData - DispatchQueue.main.async { [weak self] in + DispatchQueue.main.async(execute: { [weak self] in self?.loadMessages() // Re-enable UI if it was left in a processing state @@ -273,7 +273,7 @@ class ChatViewController: UIViewController, UITableViewDataSource, UITableViewDe welcomeLabel.topAnchor.constraint(equalTo: animationView.bottomAnchor, constant: 16), welcomeLabel.centerXAnchor.constraint(equalTo: emptyView.centerXAnchor), welcomeLabel.leadingAnchor.constraint(equalTo: emptyView.leadingAnchor, constant: 30), - welcomeLabel.trailingAnchor.constraint(equalTo: emptyView.trailingAnchor, constant: -30) + welcomeLabel.trailingAnchor.constraint(equalTo: emptyView.trailingAnchor, constant: -30), ]) // Add to table view @@ -784,7 +784,7 @@ class ChatViewController: UIViewController, UITableViewDataSource, UITableViewDe /// Handle timeout of message processing (e.g., when app is backgrounded for too long) private func handleMessageProcessingTimeout() { - DispatchQueue.main.async { [weak self] in + DispatchQueue.main.async(execute: { [weak self] in guard let self = self, self.isProcessingMessage else { return } // Reset UI state