Fix Favorites performance

This commit is contained in:
Arkadiusz Fal 2022-12-22 19:36:35 +01:00
parent 3661d06080
commit a763e1d097
2 changed files with 15 additions and 12 deletions

View File

@ -29,6 +29,7 @@ struct HistoryView: View {
} }
} }
} }
.animation(nil, value: visibleWatches)
.onAppear { .onAppear {
visibleWatches visibleWatches
.forEach(player.loadHistoryVideoDetails) .forEach(player.loadHistoryVideoDetails)

View File

@ -80,18 +80,20 @@ struct HomeView: View {
} }
if !accounts.current.isNil, showFavoritesInHome { if !accounts.current.isNil, showFavoritesInHome {
#if os(tvOS) LazyVStack(alignment: .leading) {
ForEach(Defaults[.favorites]) { item in #if os(tvOS)
FavoriteItemView(item: item) ForEach(Defaults[.favorites]) { item in
} FavoriteItemView(item: item)
#else }
ForEach(favorites) { item in #else
FavoriteItemView(item: item) ForEach(favorites) { item in
#if os(macOS) FavoriteItemView(item: item)
.workaroundForVerticalScrollingBug() #if os(macOS)
#endif .workaroundForVerticalScrollingBug()
} #endif
#endif }
#endif
}
} }
#if os(iOS) #if os(iOS)