From 4d4248662df7d2bf142f33db8264e6ad7ef9499a Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Wed, 29 Sep 2021 13:49:37 +0200 Subject: [PATCH] Switch to horizontal cells for playlists on tvOS --- Shared/Playlists/PlaylistsView.swift | 11 ++++++++--- Shared/Trending/TrendingView.swift | 6 ++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Shared/Playlists/PlaylistsView.swift b/Shared/Playlists/PlaylistsView.swift index 5bc0fff7..fc4ff192 100644 --- a/Shared/Playlists/PlaylistsView.swift +++ b/Shared/Playlists/PlaylistsView.swift @@ -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 } } } diff --git a/Shared/Trending/TrendingView.swift b/Shared/Trending/TrendingView.swift index 4bf8a13d..75c8bd86 100644 --- a/Shared/Trending/TrendingView.swift +++ b/Shared/Trending/TrendingView.swift @@ -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)