We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b0a3c6 commit 35ba0a7Copy full SHA for 35ba0a7
Sources/Core/Service/ChatService.swift
@@ -818,7 +818,13 @@ class ChatService : ChatServiceProtocol {
818
819
if let websocketManager = self?.websocketManager {
820
let formattedItems = websocketManager.formatAndProcessTranscriptItems(transcriptItems)
821
- self?.triggerTranscriptListUpdate()
+
822
+ // Dispatch the transcript list update to the next run loop cycle
823
+ // to ensure formatAndProcessTranscriptItems completes all its internal processing
824
+ DispatchQueue.main.async {
825
+ self?.triggerTranscriptListUpdate()
826
+ }
827
828
let transcriptResponse = TranscriptResponse(
829
initialContactId: response.initialContactId ?? "",
830
nextToken: response.nextToken ?? "", // Handle nextToken if it is available in the response
0 commit comments