aboutsummaryrefslogtreecommitdiff
path: root/Hotline
diff options
context:
space:
mode:
authorDustin Mierau <dustin@mierau.me>2024-05-17 14:26:16 -0700
committerDustin Mierau <dustin@mierau.me>2024-05-17 14:26:16 -0700
commit39255f49250e3b0ccbd42661614a7c8a3e0d4fb7 (patch)
tree90c1a2f62965c9038c3b79bc1ad24c03e2b81d8a /Hotline
parent8da18773ef50f0111dda8e9b4cdcff2996326b85 (diff)
Attempt to fix scroll to bottom in private messaging scroll view.
Diffstat (limited to 'Hotline')
-rw-r--r--Hotline/macOS/MessageView.swift8
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 {