fix(ios): revalidate deferred streaming auto-scroll

Follow up on PR review by re-checking the pin-to-bottom state inside the deferred streaming scroll task. This keeps queued tasks from yanking the list back down after the user scrolls away during token streaming.\n\nAlso rebase the branch onto current origin/main and validate with a simulator build.
This commit is contained in:
Eulices Lopez 2026-03-19 10:42:51 -04:00
parent 47f4adcefc
commit 3d7095f9ce

View File

@ -183,6 +183,7 @@ public struct OpenClawChatView: View {
// Defer past the current layout pass to avoid "onChange tried to update
// multiple times per frame" warnings during rapid streaming token delivery.
Task { @MainActor in
guard self.hasPerformedInitialScroll, self.isPinnedToBottom else { return }
withAnimation(.snappy(duration: 0.22)) {
self.scrollPosition = self.scrollerBottomID
}