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 { VStack {
#if os(tvOS) #if os(tvOS)
toolbar toolbar
.font(.system(size: 28))
#endif #endif
if model.currentPlaylist != nil, videos.isEmpty { if model.currentPlaylist != nil, videos.isEmpty {
hintText("Playlist is empty\n\nTap and hold on a video and then tap \"Add to Playlist\"") hintText("Playlist is empty\n\nTap and hold on a video and then tap \"Add to Playlist\"")
} else if model.all.isEmpty { } else if model.all.isEmpty {
hintText("You have no playlists\n\nTap on \"New Playlist\" to create one") hintText("You have no playlists\n\nTap on \"New Playlist\" to create one")
} else { } 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 toolbar
VideosCellsHorizontal(videos: store.collection) VideosCellsHorizontal(videos: store.collection)
.padding(.top, 40) .padding(.top, 40)
Spacer()
#else #else
VideosCellsVertical(videos: store.collection) VideosCellsVertical(videos: store.collection)
#endif #endif
#if os(tvOS)
Spacer()
#endif
} }
} }
#if os(tvOS) #if os(tvOS)