Observe changes on library item objects
This commit is contained in:
@ -246,7 +246,6 @@ import Views
|
||||
predicate: filter.predicate,
|
||||
sort: filter.sortDescriptor
|
||||
)
|
||||
print("FEATURE ITEMS: ", featureItems)
|
||||
}
|
||||
} else {
|
||||
featureItems = []
|
||||
|
||||
@ -32,7 +32,7 @@ struct LibraryItemListNavigationLink: View {
|
||||
@EnvironmentObject var dataService: DataService
|
||||
@EnvironmentObject var audioController: AudioController
|
||||
|
||||
let item: Models.LibraryItem
|
||||
@ObservedObject var item: Models.LibraryItem
|
||||
@ObservedObject var viewModel: HomeFeedViewModel
|
||||
|
||||
var body: some View {
|
||||
@ -67,7 +67,8 @@ struct LibraryItemGridCardNavigationLink: View {
|
||||
|
||||
@State private var scale = 1.0
|
||||
|
||||
let item: Models.LibraryItem
|
||||
@ObservedObject var item: Models.LibraryItem
|
||||
|
||||
let actionHandler: (GridCardAction) -> Void
|
||||
|
||||
@Binding var isContextMenuOpen: Bool
|
||||
|
||||
@ -929,17 +929,11 @@ struct AnimatingCellHeight: AnimatableModifier {
|
||||
ScrollView {
|
||||
LazyVGrid(columns: [GridItem(.adaptive(minimum: 325, maximum: 400), spacing: 16)], alignment: .center, spacing: 30) {
|
||||
if viewModel.showLoadingBar {
|
||||
// JACKSON TODO
|
||||
ForEach(Array(fakeLibraryItems(dataService: dataService).enumerated()), id: \.1.id) { _, item in
|
||||
GridCard(item: item, isContextMenuOpen: $isContextMenuOpen, actionHandler: { _ in
|
||||
|
||||
EmptyView()
|
||||
// ForEach(fakeLibraryItems(dataService: dataService)) { item in
|
||||
// GridCardNavigationLink(
|
||||
// item: item,
|
||||
// actionHandler: { contextMenuActionHandler(item: item, action: $0) },
|
||||
// isContextMenuOpen: $isContextMenuOpen,
|
||||
// viewModel: viewModel
|
||||
// )
|
||||
// }.redacted(reason: .placeholder)
|
||||
})
|
||||
}.redacted(reason: .placeholder)
|
||||
} else {
|
||||
ForEach(viewModel.fetcher.items) { item in
|
||||
LibraryItemGridCardNavigationLink(
|
||||
|
||||
Reference in New Issue
Block a user