From 58b45cd2be661f4c05e9da73e12e88b1dff99c6e Mon Sep 17 00:00:00 2001 From: Aiden Vigue Date: Sun, 23 May 2021 23:38:57 -0400 Subject: [PATCH] Switch from ExyteGrid to lazygrid --- JellyfinPlayer/ContinueWatchingView.swift | 2 +- JellyfinPlayer/LatestMediaView.swift | 2 +- JellyfinPlayer/LibraryView.swift | 154 +++++++++++----------- JellyfinPlayer/NextUpView.swift | 6 +- 4 files changed, 82 insertions(+), 82 deletions(-) diff --git a/JellyfinPlayer/ContinueWatchingView.swift b/JellyfinPlayer/ContinueWatchingView.swift index cb565758..0728f566 100644 --- a/JellyfinPlayer/ContinueWatchingView.swift +++ b/JellyfinPlayer/ContinueWatchingView.swift @@ -109,7 +109,7 @@ struct ContinueWatchingView: View { if(resumeItems.count != 0) { VStack(alignment: .leading) { ScrollView(.horizontal, showsIndicators: false) { - HStack() { + LazyHStack() { if(isLoading == false) { Spacer().frame(width:16) ForEach(resumeItems, id: \.Id) { item in diff --git a/JellyfinPlayer/LatestMediaView.swift b/JellyfinPlayer/LatestMediaView.swift index 9d572176..44f91a87 100644 --- a/JellyfinPlayer/LatestMediaView.swift +++ b/JellyfinPlayer/LatestMediaView.swift @@ -84,7 +84,7 @@ struct LatestMediaView: View { var body: some View { ScrollView(.horizontal, showsIndicators: false) { - HStack() { + LazyHStack() { Spacer().frame(width:18) ForEach(resumeItems, id: \.Id) { item in NavigationLink(destination: ItemView(item: item)) { diff --git a/JellyfinPlayer/LibraryView.swift b/JellyfinPlayer/LibraryView.swift index 570b9ad5..77aae1bf 100644 --- a/JellyfinPlayer/LibraryView.swift +++ b/JellyfinPlayer/LibraryView.swift @@ -33,8 +33,6 @@ struct LibraryView: View { @State private var url: String = ""; @State private var closeSearch: Bool = false; - var gridItems: [GridItem] = [GridItem(.adaptive(minimum: 150, maximum: 400))] - init(prefill: String?, names: [String: String], libraries: [String]) { _prefill_id = State(wrappedValue: prefill ?? "") _library_names = State(wrappedValue: names) @@ -166,91 +164,93 @@ struct LibraryView: View { _tracks.wrappedValue = [] for _ in (0..