fix(player): collapse the expanded player to the minibar when opening a channel
Some checks failed
build-apk / build-and-publish (push) Successful in 9m38s
gitleaks / scan (push) Failing after 2s

Tapping the channel from the video page pushed Screen.Channel but left the
player expanded; its opaque body sits z-above ScreenContent, so the channel
page was hidden until the user manually minimized the panel. Set expanded=false
alongside the nav.push so the destination is revealed by the same collapse
morph as swipe-down. Playback continues in the minibar; related-video and
fullscreen paths (which intentionally stay expanded) are unaffected.
This commit is contained in:
Cobb 2026-07-28 21:50:38 -07:00
parent 3d86b5be52
commit 6d7e5508bb

View file

@ -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,
)
}