Fix placeholders

This commit is contained in:
Arkadiusz Fal
2022-12-14 17:20:24 +01:00
parent 2028446d03
commit 71c666ebfe
6 changed files with 15 additions and 14 deletions

View File

@@ -48,11 +48,7 @@ struct VerticalCells<Header: View>: View {
}
var contentItems: [ContentItem] {
items.isEmpty ? (allowEmpty ? items : placeholders) : items.sorted { $0 < $1 }
}
var placeholders: [ContentItem] {
(0 ..< 9).map { _ in .init() }
items.isEmpty ? (allowEmpty ? items : ContentItem.placeholders) : items.sorted { $0 < $1 }
}
func loadMoreContentItemsIfNeeded(current item: ContentItem) {