diff --git a/strawApp/src/main/kotlin/com/sulkta/straw/StrawActivity.kt b/strawApp/src/main/kotlin/com/sulkta/straw/StrawActivity.kt index d69e2b918..32a326fb5 100644 --- a/strawApp/src/main/kotlin/com/sulkta/straw/StrawActivity.kt +++ b/strawApp/src/main/kotlin/com/sulkta/straw/StrawActivity.kt @@ -184,7 +184,23 @@ class StrawActivity : ComponentActivity() { expandedTarget = expanded, onTargetChange = { expanded = it }, onFullscreen = { url, title -> nav.push(Screen.Player(url, title)) }, - onOpenChannel = { url, name -> nav.push(Screen.Channel(url, name)) }, + // Navigating to a DIFFERENT destination from the + // expanded player must collapse it to the minibar + // first — the expanded body is opaque and sits + // z-above ScreenContent, so without this the + // pushed Channel screen is invisible until the + // user manually minimizes the player. Playback + // continues in the minibar (collapse never + // touches the controller). Related-video taps + // are the OPPOSITE case: they go through + // openVideo (swap-in-place, sets expanded=true) + // and stay expanded; ⛶ fullscreen also stays + // expanded (Screen.Player un-composes this + // overlay and restores it expanded on pop). + onOpenChannel = { url, name -> + expanded = false + nav.push(Screen.Channel(url, name)) + }, onOpenVideo = openVideo, ) }