diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift index dffa4dd11..9c1b17f0e 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift @@ -5,6 +5,8 @@ import UserNotifications import Utils import Views +private let enableGrid = UIDevice.isIPad || FeatureFlag.enableGridCardsOnPhone + #if os(iOS) struct HomeFeedContainerView: View { @EnvironmentObject var dataService: DataService @@ -54,18 +56,22 @@ import Views Button("", action: {}) .disabled(true) .overlay { - if viewModel.isLoading, !prefersListLayout { + if viewModel.isLoading, !prefersListLayout, enableGrid { ProgressView() } } } ToolbarItem(placement: UIDevice.isIPhone ? .barLeading : .barTrailing) { - Button( - action: { prefersListLayout.toggle() }, - label: { - Label("Toggle Feed Layout", systemImage: prefersListLayout ? "square.grid.2x2" : "list.bullet") - } - ) + if enableGrid { + Button( + action: { prefersListLayout.toggle() }, + label: { + Label("Toggle Feed Layout", systemImage: prefersListLayout ? "square.grid.2x2" : "list.bullet") + } + ) + } else { + EmptyView() + } } ToolbarItem(placement: .barTrailing) { if UIDevice.isIPhone { @@ -149,7 +155,7 @@ import Views } } } - if prefersListLayout { + if prefersListLayout || !enableGrid { HomeFeedListView(prefersListLayout: $prefersListLayout, viewModel: viewModel) } else { HomeFeedGridView(viewModel: viewModel) diff --git a/apple/OmnivoreKit/Sources/Utils/FeatureFlags.swift b/apple/OmnivoreKit/Sources/Utils/FeatureFlags.swift index 43385fcc4..9ce3b9eb1 100644 --- a/apple/OmnivoreKit/Sources/Utils/FeatureFlags.swift +++ b/apple/OmnivoreKit/Sources/Utils/FeatureFlags.swift @@ -14,4 +14,5 @@ public enum FeatureFlag { public static let enablePushNotifications = false public static let enableShareButton = false public static let enableSnooze = false + public static let enableGridCardsOnPhone = false }