From 5d9cf3e370d4723a8e68364f1ff5f3c852de7d51 Mon Sep 17 00:00:00 2001 From: Kayos Date: Mon, 25 May 2026 16:33:50 -0700 Subject: [PATCH] vc=44: fix back-from-fullscreen showing thumbnail placeholder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported: press fullscreen → press system back → VideoDetail re-renders as a "freshly loaded page" — thumbnail with Play button overlay visible, audio continuing from the persistent MediaController. Root cause: `var inlinePlaying by remember(streamUrl) { mutableStateOf(false) }` at VideoDetailScreen.kt:125 keys on streamUrl, so popping back from Player remounts the composable with a fresh false. The thumbnail placeholder Box renders instead of InlinePlayer; audio keeps going on the shared controller because nothing was stopped. Fix: default inlinePlaying to true when the shared controller is already playing this exact stream — almost always the back-from- fullscreen case. Fresh navigation to a video that isn't currently playing still gets the thumbnail+Play placeholder as before. --- buildSrc/src/main/kotlin/ProjectConfig.kt | 4 ++-- .../sulkta/straw/feature/detail/VideoDetailScreen.kt | 12 +++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/buildSrc/src/main/kotlin/ProjectConfig.kt b/buildSrc/src/main/kotlin/ProjectConfig.kt index 033ec3f95..839b5c708 100644 --- a/buildSrc/src/main/kotlin/ProjectConfig.kt +++ b/buildSrc/src/main/kotlin/ProjectConfig.kt @@ -55,6 +55,6 @@ const val NEWPIPE_APPLICATION_ID_NEW = "net.newpipe.app" // vc=19 / 0.1.0-AE — rust pipeline cutover. Extraction via // strawcore-core (Sulkta-Coop/strawcore) via the UniFFI wrapper; no // NewPipeExtractor in the runtime path. -const val STRAW_VERSION_CODE = 43 -const val STRAW_VERSION_NAME = "0.1.0-BC" +const val STRAW_VERSION_CODE = 44 +const val STRAW_VERSION_NAME = "0.1.0-BD" const val STRAW_APPLICATION_ID = "com.sulkta.straw" diff --git a/strawApp/src/main/kotlin/com/sulkta/straw/feature/detail/VideoDetailScreen.kt b/strawApp/src/main/kotlin/com/sulkta/straw/feature/detail/VideoDetailScreen.kt index d28b26527..ea3800279 100644 --- a/strawApp/src/main/kotlin/com/sulkta/straw/feature/detail/VideoDetailScreen.kt +++ b/strawApp/src/main/kotlin/com/sulkta/straw/feature/detail/VideoDetailScreen.kt @@ -122,7 +122,17 @@ fun VideoDetailScreen( var showDownloadDialog by remember { mutableStateOf(false) } var showSaveToPlaylistDialog by remember { mutableStateOf(false) } // Inline-play state resets when navigating to a different video. - var inlinePlaying by remember(streamUrl) { mutableStateOf(false) } + // BUT: if the shared MediaController is already playing this exact + // stream — most commonly because the user popped back from + // fullscreen Player — default to true so the inline surface picks + // up the running playback instead of dropping back to the + // thumbnail+Play placeholder. Without this, system back from + // fullscreen looked like "the video went to background" — audio + // continued via the persistent controller but the video page + // re-rendered as a freshly-loaded detail. + var inlinePlaying by remember(streamUrl) { + mutableStateOf(NowPlaying.current.value?.streamUrl == streamUrl) + } LaunchedEffect(streamUrl) { vm.load(streamUrl) } // The Background button (and the fullscreen audio-only toggle)