aboutsummaryrefslogtreecommitdiff
path: root/Hotline/Views/ChatView.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Hotline/Views/ChatView.swift')
-rw-r--r--Hotline/Views/ChatView.swift5
1 files changed, 3 insertions, 2 deletions
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) {