From 8da18773ef50f0111dda8e9b4cdcff2996326b85 Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Fri, 17 May 2024 14:11:55 -0700 Subject: Attempt to fix chat scroll issue in public chat. --- Hotline/macOS/ChatView.swift | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Hotline/macOS/ChatView.swift') diff --git a/Hotline/macOS/ChatView.swift b/Hotline/macOS/ChatView.swift index 62bab69..b7b92d6 100644 --- a/Hotline/macOS/ChatView.swift +++ b/Hotline/macOS/ChatView.swift @@ -119,16 +119,15 @@ struct ChatView: View { .padding(EdgeInsets(top: 2, leading: 0, bottom: 2, trailing: 0)) } } - EmptyView().id(bottomID) } .padding() + + VStack(spacing: 0) {}.id(bottomID) } .frame(maxWidth: .infinity, maxHeight: .infinity) .defaultScrollAnchor(.bottom) .onChange(of: model.chat.count) { - withAnimation(.easeOut(duration: 0.15).delay(0.25)) { - reader.scrollTo(bottomID, anchor: .bottom) - } + reader.scrollTo(bottomID, anchor: .bottom) model.markPublicChatAsRead() } .onAppear { -- cgit