Switch to horizontal cells for playlists on tvOS

This commit is contained in:
Arkadiusz Fal 2021-09-29 13:49:37 +02:00
parent ef5c75a2bc
commit 4d4248662d
2 changed files with 10 additions and 7 deletions

View File

@ -26,15 +26,20 @@ struct PlaylistsView: View {
VStack {
#if os(tvOS)
toolbar
.font(.system(size: 28))
#endif
if model.currentPlaylist != nil, videos.isEmpty {
hintText("Playlist is empty\n\nTap and hold on a video and then tap \"Add to Playlist\"")
} else if model.all.isEmpty {
hintText("You have no playlists\n\nTap on \"New Playlist\" to create one")
} else {
VideosCellsVertical(videos: videos)
#if os(tvOS)
VideosCellsHorizontal(videos: videos)
.padding(.top, 40)
Spacer()
#else
VideosCellsVertical(videos: videos)
#endif
}
}
}

View File

@ -31,13 +31,11 @@ struct TrendingView: View {
toolbar
VideosCellsHorizontal(videos: store.collection)
.padding(.top, 40)
Spacer()
#else
VideosCellsVertical(videos: store.collection)
#endif
#if os(tvOS)
Spacer()
#endif
}
}
#if os(tvOS)