From 5383e8133bde2661d63c6cf451d5ec8e30f335e5 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Fri, 8 Mar 2024 12:49:41 +0800 Subject: [PATCH] Dont show footer during loading --- .../Sources/App/Views/Home/HomeFeedViewIOS.swift | 6 ++++-- apple/OmnivoreKit/Sources/Views/FeedItem/GridCard.swift | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift index 2fa9ec946..978ac9722 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift @@ -832,7 +832,9 @@ struct AnimatingCellHeight: AnimatableModifier { }, header: { filtersHeader }) - BottomView(viewModel: viewModel) + if viewModel.showLoadingBar == .none { + BottomView(viewModel: viewModel) + } } .padding(0) .listStyle(.plain) @@ -1038,7 +1040,7 @@ struct AnimatingCellHeight: AnimatableModifier { } } - if viewModel.fetcher.items.isEmpty { + if viewModel.fetcher.items.isEmpty || viewModel.showLoadingBar == .redacted || viewModel.showLoadingBar == .simple { EmptyState(viewModel: viewModel) } else { HStack { diff --git a/apple/OmnivoreKit/Sources/Views/FeedItem/GridCard.swift b/apple/OmnivoreKit/Sources/Views/FeedItem/GridCard.swift index 4229cc18d..15a79b8e5 100644 --- a/apple/OmnivoreKit/Sources/Views/FeedItem/GridCard.swift +++ b/apple/OmnivoreKit/Sources/Views/FeedItem/GridCard.swift @@ -11,7 +11,7 @@ public enum GridCardAction { } public struct GridCard: View { - let item: Models.LibraryItem + @ObservedObject var item: Models.LibraryItem public init( item: Models.LibraryItem