Favorites improvements

This commit is contained in:
Arkadiusz Fal
2022-12-11 16:00:20 +01:00
parent 784fc8cfc6
commit f6a261662c
9 changed files with 169 additions and 52 deletions

View File

@@ -6,9 +6,7 @@ import UniformTypeIdentifiers
struct HomeView: View {
@ObservedObject private var accounts = AccountsModel.shared
@State private var dragging: FavoriteItem?
@State private var presentingEditFavorites = false
@State private var favoritesChanged = false
@FetchRequest(sortDescriptors: [.init(key: "watchedAt", ascending: false)])
@@ -75,11 +73,11 @@ struct HomeView: View {
if !accounts.current.isNil, showFavoritesInHome {
#if os(tvOS)
ForEach(Defaults[.favorites]) { item in
FavoriteItemView(item: item, dragging: $dragging)
FavoriteItemView(item: item)
}
#else
ForEach(favorites) { item in
FavoriteItemView(item: item, dragging: $dragging)
FavoriteItemView(item: item)
#if os(macOS)
.workaroundForVerticalScrollingBug()
#endif