From 6d7e5508bba6b24816f26a7937d504d4cdb6aa9c Mon Sep 17 00:00:00 2001 From: Cobb Date: Tue, 28 Jul 2026 21:50:38 -0700 Subject: [PATCH] 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. --- .../kotlin/com/sulkta/straw/StrawActivity.kt | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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, ) }