ios recently added

This commit is contained in:
Ethan Pippin 2022-01-08 23:44:15 -07:00
parent 5bfb8e240d
commit a2dfc9fc0c
1 changed files with 13 additions and 2 deletions

View File

@ -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)