From e2723adc713d2e5305e6c1bf1f551ddb2624c77b Mon Sep 17 00:00:00 2001 From: Cobb Date: Sat, 20 Jun 2026 09:57:59 -0700 Subject: [PATCH] Minibar swipe-up-to-restore + vc=74 (0.1.0-CH) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Item 1 (partial): the minibar was tap-to-expand only — added an upward-drag gesture that expands back to the full player when released past a small threshold (Cobb: couldn't swipe the minibar back up). The continuous collapse-into-the-bar shared-element animation is deferred — needs on-device iteration. vc=74 ships items 2-5 fully + this. --- buildSrc/src/main/kotlin/ProjectConfig.kt | 4 +-- .../straw/feature/player/MinibarOverlay.kt | 25 ++++++++++++++++++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/buildSrc/src/main/kotlin/ProjectConfig.kt b/buildSrc/src/main/kotlin/ProjectConfig.kt index d3a34ae21..5277bb4cc 100644 --- a/buildSrc/src/main/kotlin/ProjectConfig.kt +++ b/buildSrc/src/main/kotlin/ProjectConfig.kt @@ -57,6 +57,6 @@ const val STRAW_SDK_TARGET = 35 // 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 = 73 -const val STRAW_VERSION_NAME = "0.1.0-CG" +const val STRAW_VERSION_CODE = 74 +const val STRAW_VERSION_NAME = "0.1.0-CH" const val STRAW_APPLICATION_ID = "com.sulkta.straw" diff --git a/strawApp/src/main/kotlin/com/sulkta/straw/feature/player/MinibarOverlay.kt b/strawApp/src/main/kotlin/com/sulkta/straw/feature/player/MinibarOverlay.kt index 561d69af4..e50e576c6 100644 --- a/strawApp/src/main/kotlin/com/sulkta/straw/feature/player/MinibarOverlay.kt +++ b/strawApp/src/main/kotlin/com/sulkta/straw/feature/player/MinibarOverlay.kt @@ -16,6 +16,9 @@ package com.sulkta.straw.feature.player import androidx.compose.foundation.background import androidx.compose.foundation.clickable +import androidx.compose.foundation.gestures.Orientation +import androidx.compose.foundation.gestures.draggable +import androidx.compose.foundation.gestures.rememberDraggableState import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -40,6 +43,7 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.DisposableEffect import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableFloatStateOf import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue @@ -101,6 +105,16 @@ fun MinibarOverlay( onDispose { controller.removeListener(listener) } } + // Swipe up on the bar to expand back to the full player (vc=74). Was + // tap-only before — Cobb couldn't swipe the minibar back up to return + // to the video. Tap still works; this just adds the upward-drag path. + // Accumulates the vertical drag and expands when released past a small + // upward threshold (delta is negative going up). + val density = androidx.compose.ui.platform.LocalDensity.current + val expandThresholdPx = with(density) { 32.dp.toPx() } + var dragUp by remember { mutableFloatStateOf(0f) } + val expandDragState = rememberDraggableState { delta -> dragUp += delta } + // navigationBarsPadding shifts the whole minibar up by the system // nav-bar height so the bar sits ABOVE the gesture pill / 3-button // nav, not behind them. enableEdgeToEdge in StrawActivity means @@ -112,7 +126,16 @@ fun MinibarOverlay( modifier = Modifier .fillMaxWidth() .height(64.dp) - .clickable(onClick = onExpand), + .clickable(onClick = onExpand) + .draggable( + orientation = Orientation.Vertical, + state = expandDragState, + onDragStarted = { dragUp = 0f }, + onDragStopped = { + if (dragUp < -expandThresholdPx) onExpand() + dragUp = 0f + }, + ), ) { Row( verticalAlignment = Alignment.CenterVertically,