Follow the user's preference for poster type in the Latest section (#1519)

This commit is contained in:
Daniel Chick 2025-04-29 14:53:17 -05:00 committed by GitHub
parent 0f748f2376
commit ded2314878
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -6,6 +6,7 @@
// Copyright (c) 2025 Jellyfin & Jellyfin Contributors // Copyright (c) 2025 Jellyfin & Jellyfin Contributors
// //
import Defaults
import JellyfinAPI import JellyfinAPI
import SwiftUI import SwiftUI
@ -13,6 +14,9 @@ extension HomeView {
struct LatestInLibraryView: View { struct LatestInLibraryView: View {
@Default(.Customization.latestInLibraryPosterType)
private var latestInLibraryPosterType
@EnvironmentObject @EnvironmentObject
private var router: HomeCoordinator.Router private var router: HomeCoordinator.Router
@ -23,7 +27,7 @@ extension HomeView {
if viewModel.elements.isNotEmpty { if viewModel.elements.isNotEmpty {
PosterHStack( PosterHStack(
title: L10n.latestWithString(viewModel.parent?.displayTitle ?? .emptyDash), title: L10n.latestWithString(viewModel.parent?.displayTitle ?? .emptyDash),
type: .portrait, type: latestInLibraryPosterType,
items: viewModel.elements items: viewModel.elements
) )
.onSelect { item in .onSelect { item in