Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,13 @@ data class HomeRowViewOptions(
val episodeContentScale: PrefContentScale = PrefContentScale.FILL,
val episodeAspectRatio: AspectRatio = AspectRatio.TALL,
val episodeImageType: ViewOptionImageType = ViewOptionImageType.PRIMARY,
val showcase: Boolean = false,
val showcaseShowLogo: Boolean = true,
val showcaseShowRating: Boolean = true,
val showcaseShowOverview: Boolean = true,
val showcaseShowDetails: Boolean = true,
val showcaseInfiniteScroll: Boolean = true,
val showcaseRotateArtwork: Boolean = false,
) {
companion object {
val genreDefault =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import dagger.hilt.android.qualifiers.ApplicationContext
import kotlinx.coroutines.FlowPreview
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.firstOrNull
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.withContext
Expand Down Expand Up @@ -51,6 +52,17 @@ class BackdropService
private val _backdropFlow = MutableStateFlow<BackdropResult>(BackdropResult.NONE)
val backdropFlow = _backdropFlow

private val _showcaseFlow = MutableStateFlow<ShowcaseArtwork?>(null)

/**
* The artwork for a focused showcase row, drawn full screen behind the nav drawer
*/
val showcaseFlow: StateFlow<ShowcaseArtwork?> = _showcaseFlow

fun setShowcase(showcase: ShowcaseArtwork?) {
_showcaseFlow.value = showcase
}

/**
* Update the backdrop to use the specified item
*/
Expand Down Expand Up @@ -241,6 +253,14 @@ class BackdropService
}
}

/**
* The item whose artwork is shown full screen for a focused showcase row
*/
data class ShowcaseArtwork(
val item: BaseItem,
val rotate: Boolean,
)

/**
* The result from determining the backdrop URL and extracted colors for the dynamic backdrop
*/
Expand Down
246 changes: 152 additions & 94 deletions app/src/main/java/com/github/damontecres/wholphin/ui/main/HomePage.kt

Large diffs are not rendered by default.

Loading