File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -130,10 +130,8 @@ private extension ItemListView {
130130 ItemCardView ( item: item)
131131 } )
132132 }
133- if let shouldShowGhostableItemCard = viewModel. shouldShowGhostableItemCard {
134- GhostItemCardView ( )
135- . renderedIf ( shouldShowGhostableItemCard && viewModel. state == . loading)
136- }
133+ GhostItemCardView ( )
134+ . renderedIf ( viewModel. shouldShowGhostableItemCard && viewModel. state == . loading)
137135 }
138136 . padding ( . bottom, floatingControlAreaSize. height)
139137 . padding ( . horizontal, Constants . itemListPadding)
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ final class ItemListViewModel: ItemListViewModelProtocol {
1212
1313 @Published private var currentPage : Int = Constants . initialPage
1414
15- private( set) var shouldShowGhostableItemCard : Bool ?
15+ private( set) var shouldShowGhostableItemCard : Bool = false
1616
1717 var shouldShowHeaderBanner : Bool {
1818 // The banner it's shown as long as it hasn't already been dismissed once:
@@ -30,7 +30,7 @@ final class ItemListViewModel: ItemListViewModelProtocol {
3030 var itemsPublisher : Published < [ POSItem ] > . Publisher { $items }
3131 var statePublisher : Published < ItemListViewModel . ItemListState > . Publisher { $state }
3232
33- init ( itemProvider: POSItemProvider , shouldShowGhostableItemCard: Bool ? = false ) {
33+ init ( itemProvider: POSItemProvider , shouldShowGhostableItemCard: Bool = false ) {
3434 self . itemProvider = itemProvider
3535 self . shouldShowGhostableItemCard = shouldShowGhostableItemCard
3636 selectedItemPublisher = selectedItemSubject. eraseToAnyPublisher ( )
You can’t perform that action at this time.
0 commit comments