Skip to content

StreamVault is a TV-first free IPTV player for Android TV built with Kotlin, Jetpack Compose, Room, Hilt, and Media3.

refactor(live): extract compact guide program dialog

David Nashash00354ab3a3bb
diff --git a/app/src/main/java/com/streamvault/app/ui/screens/epg/EpgScreen.kt b/app/src/main/java/com/streamvault/app/ui/screens/epg/EpgScreen.kt
index ba997e29..a4acb4a3 100644
--- a/app/src/main/java/com/streamvault/app/ui/screens/epg/EpgScreen.kt
+++ b/app/src/main/java/com/streamvault/app/ui/screens/epg/EpgScreen.kt
@@ -11,6 +11,8 @@ import com.streamvault.feature.live.presentation.epg.LiveGuideSearchOverlay
import com.streamvault.feature.live.presentation.epg.LiveGuideSearchOverlayLabels
import com.streamvault.feature.live.presentation.epg.LiveGuideCategoryPickerDialog
import com.streamvault.feature.live.presentation.epg.LiveGuideCategoryPickerLabels
+import com.streamvault.feature.live.presentation.epg.LiveCompactGuideProgramDialog
+import com.streamvault.feature.live.presentation.epg.LiveCompactGuideProgramLabels
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
@@ -688,11 +690,22 @@ fun FullEpgScreen(
null
}
val canWatchArchive = channel.isArchivePlayable(program, currentLiveGuideNow())
- CompactGuideProgramDialog(
+ LiveCompactGuideProgramDialog(
channel = channel,
program = program,
providerLabel = uiState.providerSourceLabel,
now = currentLiveGuideNow(),
+ labels = LiveCompactGuideProgramLabels(
+ noInfo = stringResource(R.string.epg_no_info),
+ watchLive = stringResource(R.string.epg_watch_live),
+ watchArchive = stringResource(R.string.epg_watch_archive),
+ scheduleRecording = stringResource(R.string.epg_schedule_recording),
+ scheduleDailyRecording = stringResource(R.string.epg_schedule_daily_recording),
+ scheduleWeeklyRecording = stringResource(R.string.epg_schedule_weekly_recording),
+ detailsShow = stringResource(R.string.epg_program_details_show),
+ detailsHide = stringResource(R.string.epg_program_details_hide),
+ cancel = stringResource(R.string.settings_cancel)
+ ),
onDismiss = { selectedProgram = null },
onWatchLive = {
selectedProgram = null
diff --git a/app/src/main/java/com/streamvault/app/ui/screens/epg/EpgScreenDialogs.kt b/app/src/main/java/com/streamvault/app/ui/screens/epg/EpgScreenDialogs.kt
index 65a87e20..79c1c70b 100644
--- a/app/src/main/java/com/streamvault/app/ui/screens/epg/EpgScreenDialogs.kt
+++ b/app/src/main/java/com/streamvault/app/ui/screens/epg/EpgScreenDialogs.kt
@@ -229,190 +229,6 @@ internal fun GuideOptionsOverlay(
}
}
-@Composable
-internal fun CompactGuideProgramDialog(
- channel: Channel,
- program: Program,
- providerLabel: String,
- now: Long,
- onDismiss: () -> Unit,
- onWatchLive: () -> Unit,
- onWatchArchive: (() -> Unit)?,
- reminderButtonLabel: String?,
- onToggleReminder: (() -> Unit)?,
- onScheduleRecording: (() -> Unit)?,
- onScheduleDailyRecording: (() -> Unit)?,
- onScheduleWeeklyRecording: (() -> Unit)?
-) {
- var showDetails by rememberSaveable(program.startTime, program.endTime, program.title) { mutableStateOf(false) }
- val appTimeFormat = LocalLiveTimeFormat.current
- val format = remember(appTimeFormat) { appTimeFormat.createLiveTimeFormat() }
- val firstButtonFocusRequester = remember { FocusRequester() }
- LaunchedEffect(Unit) { firstButtonFocusRequester.requestFocus() }
- GuideModalDialog(onDismiss = onDismiss) {
- Surface(
- modifier = Modifier.widthIn(min = 420.dp, max = 640.dp),
- colors = SurfaceDefaults.colors(containerColor = SurfaceElevated),
- shape = RoundedCornerShape(20.dp)
- ) {
- Column(
- modifier = Modifier
- .fillMaxWidth()
- .padding(20.dp)
- .verticalScroll(rememberScrollState()),
- verticalArrangement = Arrangement.spacedBy(14.dp)
- ) {
- Text(
- text = program.title,
- style = MaterialTheme.typography.headlineSmall,
- color = OnSurface,
- maxLines = 2,
- overflow = TextOverflow.Ellipsis
- )
- Text(
- text = buildString {
- if (channel.number > 0) { append(channel.number); append(". ") }
- append(channel.name)
- append(" | ")
- append(format.format(Date(program.startTime)))
- append(" - ")
- append(format.format(Date(program.endTime)))
- },
- style = MaterialTheme.typography.bodyMedium,
- color = OnSurfaceDim,
- maxLines = 2,
- overflow = TextOverflow.Ellipsis
- )
- if (providerLabel.isNotBlank()) {
- Text(
- text = providerLabel,
- style = MaterialTheme.typography.labelMedium,
- color = Primary
- )
- }
- if (now in program.startTime until program.endTime) {
- LinearProgressIndicator(
- progress = { ((now - program.startTime).toFloat() / (program.endTime - program.startTime).toFloat()).coerceIn(0f, 1f) },
- modifier = Modifier
- .fillMaxWidth()
- .height(4.dp),
- color = Primary,
- trackColor = SurfaceHighlight
- )
- }
- if (showDetails) {
- Text(
- text = program.description.ifBlank { stringResource(R.string.epg_no_info) },
- style = MaterialTheme.typography.bodyMedium,
- color = OnSurface,
- maxLines = 6,
- overflow = TextOverflow.Ellipsis
- )
- }
- Column(verticalArrangement = Arrangement.spacedBy(10.dp)) {
- TvButton(
- onClick = onWatchLive,
- modifier = Modifier.fillMaxWidth().focusRequester(firstButtonFocusRequester),
- scale = ButtonDefaults.scale(focusedScale = 1f)
- ) {
- Text(stringResource(R.string.epg_watch_live))
- }
- if (onWatchArchive != null) {
- TvButton(
- onClick = onWatchArchive,
- modifier = Modifier.fillMaxWidth(),
- scale = ButtonDefaults.scale(focusedScale = 1f),
- colors = ButtonDefaults.colors(
- containerColor = Primary,
- contentColor = Color.White
- )
- ) {
- Text(stringResource(R.string.epg_watch_archive))
- }
- }
- if (reminderButtonLabel != null && onToggleReminder != null) {
- TvButton(
- onClick = onToggleReminder,
- modifier = Modifier.fillMaxWidth(),
- scale = ButtonDefaults.scale(focusedScale = 1f),
- colors = ButtonDefaults.colors(
- containerColor = SurfaceHighlight,
- contentColor = OnSurface
- )
- ) {
- Text(reminderButtonLabel)
- }
- }
- if (onScheduleRecording != null) {
- TvButton(
- onClick = { onScheduleRecording(); onDismiss() },
- modifier = Modifier.fillMaxWidth(),
- scale = ButtonDefaults.scale(focusedScale = 1f),
- colors = ButtonDefaults.colors(
- containerColor = com.streamvault.core.ui.theme.AccentRed,
- contentColor = Color.White
- )
- ) {
- Text(stringResource(R.string.epg_schedule_recording))
- }
- }
- if (onScheduleDailyRecording != null) {
- TvButton(
- onClick = { onScheduleDailyRecording(); onDismiss() },
- modifier = Modifier.fillMaxWidth(),
- scale = ButtonDefaults.scale(focusedScale = 1f),
- colors = ButtonDefaults.colors(
- containerColor = SurfaceHighlight,
- contentColor = OnSurface
- )
- ) {
- Text(stringResource(R.string.epg_schedule_daily_recording))
- }
- }
- if (onScheduleWeeklyRecording != null) {
- TvButton(
- onClick = { onScheduleWeeklyRecording(); onDismiss() },
- modifier = Modifier.fillMaxWidth(),
- scale = ButtonDefaults.scale(focusedScale = 1f),
- colors = ButtonDefaults.colors(
- containerColor = SurfaceHighlight,
- contentColor = OnSurface
- )
- ) {
- Text(stringResource(R.string.epg_schedule_weekly_recording))
- }
- }
- TvButton(
- onClick = { showDetails = !showDetails },
- modifier = Modifier.fillMaxWidth(),
- scale = ButtonDefaults.scale(focusedScale = 1f),
- colors = ButtonDefaults.colors(
- containerColor = SurfaceHighlight,
- contentColor = OnSurface
- )
- ) {
- Text(
- if (showDetails) stringResource(R.string.epg_program_details_hide)
- else stringResource(R.string.epg_program_details_show)
- )
- }
- TvButton(
- onClick = onDismiss,
- modifier = Modifier.fillMaxWidth(),
- scale = ButtonDefaults.scale(focusedScale = 1f),
- colors = ButtonDefaults.colors(
- containerColor = Color.Transparent,
- contentColor = OnSurface
- )
- ) {
- Text(stringResource(R.string.settings_cancel))
- }
- }
- }
- }
- }
-}
-
@Composable
internal fun EpgOverrideDialog(
state: EpgOverrideUiState,
diff --git a/app/src/main/java/com/streamvault/app/ui/screens/epg/PlayerTransparentGuideOverlay.kt b/app/src/main/java/com/streamvault/app/ui/screens/epg/PlayerTransparentGuideOverlay.kt
index 5f1ceac6..95a448e0 100644
--- a/app/src/main/java/com/streamvault/app/ui/screens/epg/PlayerTransparentGuideOverlay.kt
+++ b/app/src/main/java/com/streamvault/app/ui/screens/epg/PlayerTransparentGuideOverlay.kt
@@ -30,7 +30,6 @@ import androidx.tv.material3.SurfaceDefaults
import androidx.tv.material3.Text
import com.streamvault.app.R
import com.streamvault.domain.playback.isArchivePlayable
-import com.streamvault.app.ui.screens.epg.CompactGuideProgramDialog
import com.streamvault.app.ui.screens.epg.EpgGrid
import com.streamvault.app.ui.screens.epg.EpgUiState
import com.streamvault.app.ui.screens.epg.EpgViewModel
@@ -40,6 +39,8 @@ import com.streamvault.feature.live.presentation.epg.LiveGuideSearchOverlay
import com.streamvault.feature.live.presentation.epg.LiveGuideSearchOverlayLabels
import com.streamvault.feature.live.presentation.epg.LiveGuideCategoryPickerDialog
import com.streamvault.feature.live.presentation.epg.LiveGuideCategoryPickerLabels
+import com.streamvault.feature.live.presentation.epg.LiveCompactGuideProgramDialog
+import com.streamvault.feature.live.presentation.epg.LiveCompactGuideProgramLabels
import com.streamvault.app.ui.screens.epg.GuideToolbarButton
import com.streamvault.feature.live.presentation.epg.currentLiveGuideNow
import com.streamvault.app.ui.screens.epg.isGuideCategoryLocked
@@ -298,11 +299,22 @@ fun PlayerTransparentGuideOverlay(
selectedProgram?.let { (channel, program) ->
val canWatchArchive = channel.id == currentPlayerChannelId && channel.isArchivePlayable(program, now)
- CompactGuideProgramDialog(
+ LiveCompactGuideProgramDialog(
channel = channel,
program = program,
providerLabel = uiState.providerSourceLabel,
now = now,
+ labels = LiveCompactGuideProgramLabels(
+ noInfo = stringResource(R.string.epg_no_info),
+ watchLive = stringResource(R.string.epg_watch_live),
+ watchArchive = stringResource(R.string.epg_watch_archive),
+ scheduleRecording = stringResource(R.string.epg_schedule_recording),
+ scheduleDailyRecording = stringResource(R.string.epg_schedule_daily_recording),
+ scheduleWeeklyRecording = stringResource(R.string.epg_schedule_weekly_recording),
+ detailsShow = stringResource(R.string.epg_program_details_show),
+ detailsHide = stringResource(R.string.epg_program_details_hide),
+ cancel = stringResource(R.string.settings_cancel)
+ ),
onDismiss = { selectedProgram = null },
onWatchLive = {
selectedProgram = null
diff --git a/docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md b/docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md
index fbd4f2f7..fe9b0205 100644
--- a/docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md
+++ b/docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md
@@ -135,8 +135,8 @@ Home channel row surface, Home channel-results header, Home category sidebar
header, channel-content state host, channel-list host, and category-list host
and hidden category/channel dialogs, the category options dialog, the
quick-filter add dialog, delete-group dialog, rename-group dialog, M3U category
-organizer dialog, M3U series-assignment dialogs, EPG search overlay, and guide
-category picker are now feature-owned
+organizer dialog, M3U series-assignment dialogs, EPG search overlay, guide
+category picker, and compact guide-program dialog are now feature-owned
while the Home and EPG
screen/dialog composition remains in `:app` for the remaining app-specific
dialogs.
@@ -146,7 +146,7 @@ presentation primitives, `HomeUiState`, `HomePreviewUiState`, Guide
mode/density/reminder presentation models, hidden collection dialogs, the
category options dialog, the quick-filter add dialog, the delete-group dialog,
and the rename-group dialog, M3U category organizer dialog, and M3U
-series-assignment dialogs, the EPG search overlay, and guide category picker
-are independent of app code;
+series-assignment dialogs, the EPG search overlay, guide category picker, and
+compact guide-program dialog are independent of app code;
screen/resource moves, golden/runtime/performance gates, and legacy app cleanup
remain open, so no live slice acceptance gate is claimed yet.
diff --git a/docs/superpowers/plans/2026-08-28-live-feature-extraction.md b/docs/superpowers/plans/2026-08-28-live-feature-extraction.md
index a869039f..b8363fda 100644
--- a/docs/superpowers/plans/2026-08-28-live-feature-extraction.md
+++ b/docs/superpowers/plans/2026-08-28-live-feature-extraction.md
@@ -25,8 +25,8 @@ Home channel row surface, Home channel-results header, Home category sidebar
header, channel-content state host, channel-list host, and category-list host
and hidden category/channel dialogs, the category options dialog, the
quick-filter add dialog, delete-group dialog, rename-group dialog, M3U category
-organizer dialog, M3U series-assignment dialogs, EPG search overlay, and guide
-category picker are now feature-owned
+organizer dialog, M3U series-assignment dialogs, EPG search overlay, guide
+category picker, and compact guide-program dialog are now feature-owned
and their feature checks are green. Home screen/dialog composition, the
remaining live cards/rows, complete locale resource migration, and acceptance
gates remain open.
@@ -695,7 +695,10 @@ assignment construction while the app retains repository mutations.
The EPG search overlay owns modal/search presentation and focus behavior while
Home/Guide callers supply localized labels and query callbacks.
The guide category picker owns filtering, selected-first ordering, focus, and
-row presentation while the app supplies lock policy and callbacks.
+row presentation while the app supplies lock policy and callbacks. The compact
+guide-program dialog now owns modal/program presentation, timing/progress,
+details state, focus, and action affordances while the app supplies labels and
+playback/recording callbacks.
quick-filter key/selection rules are covered by `LiveQuickFiltersTest`. The
remaining app-owned live cards and shell/dialog composition still require
compatibility seams before the full Home move.
diff --git a/feature/live/src/main/java/com/streamvault/feature/live/presentation/epg/LiveCompactGuideProgramDialog.kt b/feature/live/src/main/java/com/streamvault/feature/live/presentation/epg/LiveCompactGuideProgramDialog.kt
new file mode 100644
index 00000000..243fd000
--- /dev/null
+++ b/feature/live/src/main/java/com/streamvault/feature/live/presentation/epg/LiveCompactGuideProgramDialog.kt
@@ -0,0 +1,240 @@
+package com.streamvault.feature.live.presentation.epg
+
+import androidx.compose.foundation.background
+import androidx.compose.foundation.clickable
+import androidx.compose.foundation.interaction.MutableInteractionSource
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.BoxScope
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.height
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.widthIn
+import androidx.compose.foundation.rememberScrollState
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.foundation.verticalScroll
+import androidx.compose.material3.LinearProgressIndicator
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.saveable.rememberSaveable
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.focus.FocusRequester
+import androidx.compose.ui.focus.focusRequester
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.text.style.TextOverflow
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.window.Dialog
+import androidx.compose.ui.window.DialogProperties
+import androidx.tv.material3.ButtonDefaults
+import androidx.tv.material3.MaterialTheme
+import androidx.tv.material3.Surface
+import androidx.tv.material3.SurfaceDefaults
+import androidx.tv.material3.Text
+import com.streamvault.core.ui.interaction.TvButton
+import com.streamvault.core.ui.theme.AccentRed
+import com.streamvault.core.ui.theme.OnSurface
+import com.streamvault.core.ui.theme.OnSurfaceDim
+import com.streamvault.core.ui.theme.Primary
+import com.streamvault.core.ui.theme.SurfaceElevated
+import com.streamvault.core.ui.theme.SurfaceHighlight
+import com.streamvault.domain.model.Channel
+import com.streamvault.domain.model.Program
+import com.streamvault.feature.live.presentation.time.LocalLiveTimeFormat
+import com.streamvault.feature.live.presentation.time.createLiveTimeFormat
+import java.util.Date
+
+data class LiveCompactGuideProgramLabels(
+ val noInfo: String,
+ val watchLive: String,
+ val watchArchive: String,
+ val scheduleRecording: String,
+ val scheduleDailyRecording: String,
+ val scheduleWeeklyRecording: String,
+ val detailsShow: String,
+ val detailsHide: String,
+ val cancel: String
+)
+
+@Composable
+fun LiveCompactGuideProgramDialog(
+ channel: Channel,
+ program: Program,
+ providerLabel: String,
+ now: Long,
+ labels: LiveCompactGuideProgramLabels,
+ onDismiss: () -> Unit,
+ onWatchLive: () -> Unit,
+ onWatchArchive: (() -> Unit)?,
+ reminderButtonLabel: String?,
+ onToggleReminder: (() -> Unit)?,
+ onScheduleRecording: (() -> Unit)?,
+ onScheduleDailyRecording: (() -> Unit)?,
+ onScheduleWeeklyRecording: (() -> Unit)?
+) {
+ var showDetails by rememberSaveable(program.startTime, program.endTime, program.title) { mutableStateOf(false) }
+ val appTimeFormat = LocalLiveTimeFormat.current
+ val format = remember(appTimeFormat) { appTimeFormat.createLiveTimeFormat() }
+ val firstButtonFocusRequester = remember { FocusRequester() }
+ LaunchedEffect(Unit) { firstButtonFocusRequester.requestFocus() }
+
+ LiveCompactGuideModal(onDismiss = onDismiss) {
+ Surface(
+ modifier = Modifier.widthIn(min = 420.dp, max = 640.dp),
+ colors = SurfaceDefaults.colors(containerColor = SurfaceElevated),
+ shape = RoundedCornerShape(20.dp)
+ ) {
+ Column(
+ modifier = Modifier
+ .fillMaxWidth()
+ .padding(20.dp)
+ .verticalScroll(rememberScrollState()),
+ verticalArrangement = Arrangement.spacedBy(14.dp)
+ ) {
+ Text(
+ text = program.title,
+ style = MaterialTheme.typography.headlineSmall,
+ color = OnSurface,
+ maxLines = 2,
+ overflow = TextOverflow.Ellipsis
+ )
+ Text(
+ text = buildString {
+ if (channel.number > 0) { append(channel.number); append(". ") }
+ append(channel.name)
+ append(" | ")
+ append(format.format(Date(program.startTime)))
+ append(" - ")
+ append(format.format(Date(program.endTime)))
+ },
+ style = MaterialTheme.typography.bodyMedium,
+ color = OnSurfaceDim,
+ maxLines = 2,
+ overflow = TextOverflow.Ellipsis
+ )
+ if (providerLabel.isNotBlank()) {
+ Text(
+ text = providerLabel,
+ style = MaterialTheme.typography.labelMedium,
+ color = Primary
+ )
+ }
+ if (now in program.startTime until program.endTime) {
+ LinearProgressIndicator(
+ progress = { ((now - program.startTime).toFloat() / (program.endTime - program.startTime).toFloat()).coerceIn(0f, 1f) },
+ modifier = Modifier
+ .fillMaxWidth()
+ .height(4.dp),
+ color = Primary,
+ trackColor = SurfaceHighlight
+ )
+ }
+ if (showDetails) {
+ Text(
+ text = program.description.ifBlank { labels.noInfo },
+ style = MaterialTheme.typography.bodyMedium,
+ color = OnSurface,
+ maxLines = 6,
+ overflow = TextOverflow.Ellipsis
+ )
+ }
+ Column(verticalArrangement = Arrangement.spacedBy(10.dp)) {
+ TvButton(
+ onClick = onWatchLive,
+ modifier = Modifier.fillMaxWidth().focusRequester(firstButtonFocusRequester),
+ scale = ButtonDefaults.scale(focusedScale = 1f)
+ ) { Text(labels.watchLive) }
+ if (onWatchArchive != null) {
+ TvButton(
+ onClick = onWatchArchive,
+ modifier = Modifier.fillMaxWidth(),
+ scale = ButtonDefaults.scale(focusedScale = 1f),
+ colors = ButtonDefaults.colors(containerColor = Primary, contentColor = Color.White)
+ ) { Text(labels.watchArchive) }
+ }
+ if (reminderButtonLabel != null && onToggleReminder != null) {
+ TvButton(
+ onClick = onToggleReminder,
+ modifier = Modifier.fillMaxWidth(),
+ scale = ButtonDefaults.scale(focusedScale = 1f),
+ colors = ButtonDefaults.colors(containerColor = SurfaceHighlight, contentColor = OnSurface)
+ ) { Text(reminderButtonLabel) }
+ }
+ if (onScheduleRecording != null) {
+ TvButton(
+ onClick = { onScheduleRecording(); onDismiss() },
+ modifier = Modifier.fillMaxWidth(),
+ scale = ButtonDefaults.scale(focusedScale = 1f),
+ colors = ButtonDefaults.colors(containerColor = AccentRed, contentColor = Color.White)
+ ) { Text(labels.scheduleRecording) }
+ }
+ if (onScheduleDailyRecording != null) {
+ TvButton(
+ onClick = { onScheduleDailyRecording(); onDismiss() },
+ modifier = Modifier.fillMaxWidth(),
+ scale = ButtonDefaults.scale(focusedScale = 1f),
+ colors = ButtonDefaults.colors(containerColor = SurfaceHighlight, contentColor = OnSurface)
+ ) { Text(labels.scheduleDailyRecording) }
+ }
+ if (onScheduleWeeklyRecording != null) {
+ TvButton(
+ onClick = { onScheduleWeeklyRecording(); onDismiss() },
+ modifier = Modifier.fillMaxWidth(),
+ scale = ButtonDefaults.scale(focusedScale = 1f),
+ colors = ButtonDefaults.colors(containerColor = SurfaceHighlight, contentColor = OnSurface)
+ ) { Text(labels.scheduleWeeklyRecording) }
+ }
+ TvButton(
+ onClick = { showDetails = !showDetails },
+ modifier = Modifier.fillMaxWidth(),
+ scale = ButtonDefaults.scale(focusedScale = 1f),
+ colors = ButtonDefaults.colors(containerColor = SurfaceHighlight, contentColor = OnSurface)
+ ) { Text(if (showDetails) labels.detailsHide else labels.detailsShow) }
+ TvButton(
+ onClick = onDismiss,
+ modifier = Modifier.fillMaxWidth(),
+ scale = ButtonDefaults.scale(focusedScale = 1f),
+ colors = ButtonDefaults.colors(containerColor = Color.Transparent, contentColor = OnSurface)
+ ) { Text(labels.cancel) }
+ }
+ }
+ }
+ }
+}
+
+@Composable
+private fun LiveCompactGuideModal(
+ onDismiss: () -> Unit,
+ content: @Composable BoxScope.() -> Unit
+) {
+ Dialog(
+ onDismissRequest = onDismiss,
+ properties = DialogProperties(
+ usePlatformDefaultWidth = false,
+ dismissOnBackPress = true,
+ dismissOnClickOutside = false
+ )
+ ) {
+ Box(
+ modifier = Modifier.fillMaxSize(),
+ contentAlignment = androidx.compose.ui.Alignment.Center
+ ) {
+ Box(
+ modifier = Modifier
+ .matchParentSize()
+ .background(Color.Black.copy(alpha = 0.68f))
+ .clickable(
+ onClick = onDismiss,
+ indication = null,
+ interactionSource = androidx.compose.runtime.remember { MutableInteractionSource() }
+ )
+ )
+ content()
+ }
+ }
+}