Thread trailer URL from detail state into DetailUiModel

Adds trailerUrl to DetailUiState and DetailUiModel so the detail
screen's data source can pass the resolved trailer through, and
adds the missing HeroPageChanged branch to CatalogHomeStore's
no-op action list.
This commit is contained in:
KhooLy 2026-07-19 17:12:37 +03:00
parent ad6d158f43
commit eaef1fb4eb
4 changed files with 4 additions and 0 deletions

View file

@ -52,6 +52,7 @@ class AndroidDetailDataSource(
posterUrl = detail.poster,
backgroundUrl = detail.background,
logoUrl = detail.logo,
trailerUrl = state.trailerUrl,
releaseLabel = detail.releaseInfo.orEmpty(),
ratingLabel = detail.imdbRating.orEmpty(),
runtimeLabel = detail.runtime,

View file

@ -26,5 +26,6 @@ data class DetailUiState(
val savedPlayback: Meta? = null,
val similarItems: List<Meta> = emptyList(),
val trailers: List<DetailTrailer> = emptyList(),
val trailerUrl: String? = null,
val userAddons: List<AddonDescriptor> = emptyList()
)

View file

@ -21,6 +21,7 @@ class CatalogHomeStore(
is CatalogAction.PlayRequested,
is CatalogAction.ResumeRequested,
is CatalogAction.ItemFocused,
is CatalogAction.HeroPageChanged,
is CatalogAction.MarkWatchedRequested,
is CatalogAction.DropRequested,
is CatalogAction.AddToLibraryRequested -> Unit

View file

@ -48,6 +48,7 @@ data class DetailUiModel(
val posterUrl: String?,
val backgroundUrl: String?,
val logoUrl: String?,
val trailerUrl: String? = null,
val releaseLabel: String,
val ratingLabel: String,
val runtimeLabel: String?,