Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions iOS/Views/AI
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading