From 3e4fbdfcab4a4d2435aed27a16131a6ca26d7408 Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Sat, 16 Dec 2023 09:16:15 -0800 Subject: Implemented basic news reading support. Various UI tweaks. --- Hotline/Views/ChatView.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Hotline/Views/ChatView.swift') diff --git a/Hotline/Views/ChatView.swift b/Hotline/Views/ChatView.swift index 8e5b135..e8c7754 100644 --- a/Hotline/Views/ChatView.swift +++ b/Hotline/Views/ChatView.swift @@ -32,7 +32,7 @@ struct ChatView: View { .opacity(0.75) HStack { Spacer() - Text((model.server?.name ?? "") + " Server Agreement") + Text((model.serverTitle) + " Server Agreement") .font(.caption) .fontWeight(.medium) .opacity(0.4) @@ -78,6 +78,7 @@ struct ChatView: View { } .padding(.bottom, 12) } + .defaultScrollAnchor(.bottom) .onChange(of: model.chat.count) { withAnimation { reader.scrollTo(bottomID, anchor: .bottom) @@ -127,7 +128,7 @@ struct ChatView: View { .navigationBarTitleDisplayMode(.inline) .toolbar { ToolbarItem(placement: .principal) { - Text(model.server?.name ?? "") + Text(model.serverTitle) .font(.headline) } ToolbarItem(placement: .navigationBarLeading) { -- cgit