From 39255f49250e3b0ccbd42661614a7c8a3e0d4fb7 Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Fri, 17 May 2024 14:26:16 -0700 Subject: Attempt to fix scroll to bottom in private messaging scroll view. --- Hotline/macOS/MessageView.swift | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Hotline/macOS/MessageView.swift') diff --git a/Hotline/macOS/MessageView.swift b/Hotline/macOS/MessageView.swift index 61e640e..0a8b071 100644 --- a/Hotline/macOS/MessageView.swift +++ b/Hotline/macOS/MessageView.swift @@ -42,17 +42,15 @@ struct MessageView: 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.instantMessages[userID]?.count) { - withAnimation(.easeOut(duration: 0.15).delay(0.25)) { - reader.scrollTo(bottomID, anchor: .bottom) - } + reader.scrollTo(bottomID, anchor: .bottom) model.markInstantMessagesAsRead(userID: userID) } .onAppear { -- cgit