From a2dfc9fc0c4a5bd6e2a8be51dfe92bda6cc43c14 Mon Sep 17 00:00:00 2001 From: Ethan Pippin Date: Sat, 8 Jan 2022 23:44:15 -0700 Subject: [PATCH] ios recently added --- Swiftfin/Views/HomeView.swift | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Swiftfin/Views/HomeView.swift b/Swiftfin/Views/HomeView.swift index 16274325..e81881f0 100644 --- a/Swiftfin/Views/HomeView.swift +++ b/Swiftfin/Views/HomeView.swift @@ -53,6 +53,7 @@ struct HomeView: View { if !viewModel.resumeItems.isEmpty { ContinueWatchingView(viewModel: viewModel) } + if !viewModel.nextUpItems.isEmpty { PortraitImageHStackView(items: viewModel.nextUpItems, horizontalAlignment: .leading) { @@ -63,14 +64,24 @@ struct HomeView: View { } selectedAction: { item in homeRouter.route(to: \.item, item) } - + } + + if !viewModel.latestAddedItems.isEmpty { + PortraitImageHStackView(items: viewModel.latestAddedItems) { + Text("Recently Added") + .font(.title2) + .fontWeight(.bold) + .padding() + } selectedAction: { item in + homeRouter.route(to: \.item, item) + } } ForEach(viewModel.libraries, id: \.self) { library in LatestMediaView(viewModel: LatestMediaViewModel(library: library)) { HStack { - Text(L10n.latestWithString(library.name ?? "")) + Text(L10n.latestInWithString(library.name ?? "")) .font(.title2) .fontWeight(.bold)