fix(player): collapse the expanded player to the minibar when opening a channel
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:
parent
3d86b5be52
commit
6d7e5508bb
1 changed files with 17 additions and 1 deletions
|
|
@ -184,7 +184,23 @@ class StrawActivity : ComponentActivity() {
|
||||||
expandedTarget = expanded,
|
expandedTarget = expanded,
|
||||||
onTargetChange = { expanded = it },
|
onTargetChange = { expanded = it },
|
||||||
onFullscreen = { url, title -> nav.push(Screen.Player(url, title)) },
|
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,
|
onOpenVideo = openVideo,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue