From 3d26737cccd57fcbb5289874363f030ecef77573 Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Wed, 20 Dec 2023 19:01:59 -0800 Subject: Reverse sort order on news so most recent posts show at top in a category. --- Hotline/macOS/ChatView.swift | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'Hotline/macOS/ChatView.swift') diff --git a/Hotline/macOS/ChatView.swift b/Hotline/macOS/ChatView.swift index 5e6faaf..294f13b 100644 --- a/Hotline/macOS/ChatView.swift +++ b/Hotline/macOS/ChatView.swift @@ -35,10 +35,11 @@ struct ChatView: View { VStack(alignment: .leading) { Text(msg.text) .textSelection(.enabled) - .padding() + .lineSpacing(4) + .padding(32) .opacity(0.75) } - .frame(minWidth: 40, maxWidth: 400, alignment: .center) + .frame(minWidth: 150, maxWidth: 450, alignment: .center) .background(VisualEffectView(material: .titlebar, blendingMode: .withinWindow).cornerRadius(24)) .padding() } @@ -63,10 +64,14 @@ struct ChatView: View { HStack(alignment: .firstTextBaseline) { if let username = msg.username { Text("**\(username):** \(msg.text)") + .lineSpacing(4) + .multilineTextAlignment(.leading) .textSelection(.enabled) } else { Text(msg.text) + .lineSpacing(4) + .multilineTextAlignment(.leading) .textSelection(.enabled) } Spacer() @@ -82,9 +87,9 @@ struct ChatView: View { .frame(maxWidth: .infinity, maxHeight: .infinity) .defaultScrollAnchor(.bottom) .onChange(of: model.chat.count) { - withAnimation { - reader.scrollTo(bottomID, anchor: .bottom) - } +// withAnimation { + reader.scrollTo(bottomID, anchor: .bottom) +// } print("SCROLLED TO BOTTOM") } .onAppear { -- cgit