From 248fcbbd5dca84747e6f3fd9d1d52c41ab8640c3 Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Tue, 12 Dec 2023 15:27:00 -0800 Subject: New category listing is working again. Added optionset for user access info. Some UI cleanup across the board. --- Hotline/Views/NewsView.swift | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Hotline/Views/NewsView.swift') diff --git a/Hotline/Views/NewsView.swift b/Hotline/Views/NewsView.swift index 431b3ce..ad7904e 100644 --- a/Hotline/Views/NewsView.swift +++ b/Hotline/Views/NewsView.swift @@ -9,7 +9,7 @@ struct NewsView: View { @State private var topListHeight: CGFloat = 200 @State private var dividerHeight: CGFloat = 30 - var topList: some View { + var articleList: some View { // Your list content goes here List { @@ -30,10 +30,11 @@ struct NewsView: View { } } } + .scrollBounceBehavior(.basedOnSize) // .listStyle(.plain) } - var bottomList: some View { + var readerView: some View { // Your list content goes here ScrollView(.vertical) { HStack(alignment: .top, spacing: 0) { @@ -43,13 +44,14 @@ struct NewsView: View { } .padding() } + .scrollBounceBehavior(.basedOnSize) .background(colorScheme == .dark ? Color(white: 0.1) : Color(uiColor: UIColor.systemBackground)) } var body: some View { NavigationStack { VStack(spacing: 0) { - topList + articleList .frame(height: topListHeight) VStack(alignment: .center) { Divider() @@ -73,7 +75,7 @@ struct NewsView: View { // bottomListHeight = max(min(bottomListHeight - delta, 400), 0) } ) - bottomList + readerView } .task { if !fetched { -- cgit