mirror of
				https://github.com/yattee/yattee.git
				synced 2025-11-04 06:32:03 +00:00 
			
		
		
		
	Fix Favorites performance
This commit is contained in:
		@@ -29,6 +29,7 @@ struct HistoryView: View {
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        .animation(nil, value: visibleWatches)
 | 
			
		||||
        .onAppear {
 | 
			
		||||
            visibleWatches
 | 
			
		||||
                .forEach(player.loadHistoryVideoDetails)
 | 
			
		||||
 
 | 
			
		||||
@@ -80,18 +80,20 @@ struct HomeView: View {
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if !accounts.current.isNil, showFavoritesInHome {
 | 
			
		||||
                #if os(tvOS)
 | 
			
		||||
                    ForEach(Defaults[.favorites]) { item in
 | 
			
		||||
                        FavoriteItemView(item: item)
 | 
			
		||||
                    }
 | 
			
		||||
                #else
 | 
			
		||||
                    ForEach(favorites) { item in
 | 
			
		||||
                        FavoriteItemView(item: item)
 | 
			
		||||
                        #if os(macOS)
 | 
			
		||||
                            .workaroundForVerticalScrollingBug()
 | 
			
		||||
                        #endif
 | 
			
		||||
                    }
 | 
			
		||||
                #endif
 | 
			
		||||
                LazyVStack(alignment: .leading) {
 | 
			
		||||
                    #if os(tvOS)
 | 
			
		||||
                        ForEach(Defaults[.favorites]) { item in
 | 
			
		||||
                            FavoriteItemView(item: item)
 | 
			
		||||
                        }
 | 
			
		||||
                    #else
 | 
			
		||||
                        ForEach(favorites) { item in
 | 
			
		||||
                            FavoriteItemView(item: item)
 | 
			
		||||
                            #if os(macOS)
 | 
			
		||||
                                .workaroundForVerticalScrollingBug()
 | 
			
		||||
                            #endif
 | 
			
		||||
                        }
 | 
			
		||||
                    #endif
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            #if os(iOS)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user