From a25acb1219d506351717edef8ad728abcdaf50f9 Mon Sep 17 00:00:00 2001 From: Shav Kinderlehrer Date: Sat, 23 Dec 2023 11:14:53 -0500 Subject: Use asyncImage for libraryIcons --- Jel/Views/Dashboard/DashboardLibraryView.swift | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Jel/Views/Dashboard') diff --git a/Jel/Views/Dashboard/DashboardLibraryView.swift b/Jel/Views/Dashboard/DashboardLibraryView.swift index 98c92c0..00f0e68 100644 --- a/Jel/Views/Dashboard/DashboardLibraryView.swift +++ b/Jel/Views/Dashboard/DashboardLibraryView.swift @@ -14,7 +14,12 @@ struct DashboardLibraryView: View { @StateObject var authState: AuthStateController = AuthStateController.shared @State var libraries: [BaseItemDto] = [] + @State var loading: Bool = true var body: some View { + if loading { + ProgressView() + .progressViewStyle(.circular) + } ScrollView(.horizontal, showsIndicators: false) { HStack { ForEach(libraries) {library in @@ -22,9 +27,10 @@ struct DashboardLibraryView: View { NavigationLink { LibraryDetailView(library: library) } label: { - LibraryIconView(library: library, height: 200) + LibraryIconView(library: library, height: 150) .padding() } + .buttonStyle(PlainButtonStyle()) } } } @@ -36,11 +42,11 @@ struct DashboardLibraryView: View { if let results = try await jellyfinClient.send(request).value.items { libraries = results } + loading = false } catch { } } - } - } + }} } //#Preview { -- cgit v1.2.3