HomeView: Changes to Favourites and History Widget

The History Widget in the Home View was hard-coded to 10 items. Now it uses the limit set in the settings.

The items weren't immediate updated when the limit was changed.

List Views had a hard-coded limit of 10 items. Now they use the limit supplied in the parameter.
This commit is contained in:
Toni Förster
2024-05-18 00:36:40 +02:00
parent 1fe8a32fb8
commit 38c4ddbe43
4 changed files with 30 additions and 24 deletions

View File

@@ -97,11 +97,11 @@ struct HomeView: View {
VStack(alignment: .leading) {
#if os(tvOS)
ForEach(Defaults[.favorites]) { item in
FavoriteItemView(item: item)
FavoriteItemView(item: item, favoritesChanged: $favoritesChanged)
}
#else
ForEach(favorites) { item in
FavoriteItemView(item: item)
FavoriteItemView(item: item, favoritesChanged: $favoritesChanged)
#if os(macOS)
.workaroundForVerticalScrollingBug()
#endif