From 06a2166415bca7e5fe32eac505859bdd690ab8e0 Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Tue, 5 Dec 2023 17:41:22 -0800 Subject: Some styling work. Files showing. Message board tweaks. --- Hotline/Views/MessageBoardView.swift | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'Hotline/Views/MessageBoardView.swift') diff --git a/Hotline/Views/MessageBoardView.swift b/Hotline/Views/MessageBoardView.swift index e5f1521..8b1a30c 100644 --- a/Hotline/Views/MessageBoardView.swift +++ b/Hotline/Views/MessageBoardView.swift @@ -9,19 +9,25 @@ struct MessageBoardView: View { var body: some View { // @Bindable var config = appState - VStack(alignment: .leading) { - ScrollView { - VStack(alignment: .leading) { - Text(hotline.messageBoard) - .fontDesign(.monospaced) + ScrollView { + LazyVStack(alignment: .leading) { + ForEach(hotline.messageBoardMessages, id: \.self) { + Text($0) + .lineLimit(100) .padding() - .dynamicTypeSize(.small) - .textSelection(.enabled) + Divider() } } } - .presentationDetents([.fraction(0.6)]) - .presentationDragIndicator(.visible) +// List(hotline.messageBoardMessages, id: \.self) { +// Text($0) +// .lineLimit(100) +// .padding() +// Divider() +// .listRowSeparator(.hidden) +// .listRowInsets(EdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 0)) +// } +// .listStyle(.plain) .task { if !fetched { hotline.sendGetNews() { -- cgit