diff options
| author | Dustin Mierau <dustin@mierau.me> | 2024-05-17 14:26:16 -0700 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2024-05-17 14:26:16 -0700 |
| commit | 39255f49250e3b0ccbd42661614a7c8a3e0d4fb7 (patch) | |
| tree | 90c1a2f62965c9038c3b79bc1ad24c03e2b81d8a /Hotline | |
| parent | 8da18773ef50f0111dda8e9b4cdcff2996326b85 (diff) | |
Attempt to fix scroll to bottom in private messaging scroll view.
Diffstat (limited to 'Hotline')
| -rw-r--r-- | Hotline/macOS/MessageView.swift | 8 |
1 files changed, 3 insertions, 5 deletions
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 { |