Skip to content

Commit 2ac4d4b

Browse files
committed
Fix chat tab jumping
1 parent 12e0844 commit 2ac4d4b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Core/Sources/ChatGPTChatTab/ChatPanel.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,11 @@ struct ChatPanelMessages: View {
219219
EmptyView()
220220
.onChange(of: viewStore.state.isReceivingMessage) { isReceiving in
221221
if isReceiving {
222-
pinnedToBottom = true
223-
scrollToBottom()
222+
Task {
223+
pinnedToBottom = true
224+
await Task.yield()
225+
scrollToBottom()
226+
}
224227
}
225228
}
226229
.onChange(of: viewStore.state.lastMessage) { _ in

0 commit comments

Comments
 (0)