Skip to content

Fix/navbar dismiss corner behavior#2105

Merged
theovilardo merged 2 commits into
masterfrom
fix/navbar-dismiss-corner-behavior
May 26, 2026
Merged

Fix/navbar dismiss corner behavior#2105
theovilardo merged 2 commits into
masterfrom
fix/navbar-dismiss-corner-behavior

Conversation

@theovilardo

Copy link
Copy Markdown
Collaborator

No description provided.

Introduces tracking for the mini player's dismissal state to ensure smoother visual transitions. By identifying when a dismissal gesture is active, the UI can correctly animate the navigation bar's corner radius back to its collapsed state, preventing visual jumps.

- Added `isMiniPlayerDismissing` state to `PlayerViewModel` to track dismissal progress.
- Updated `MiniPlayerDismissGestureHandler` to provide an `onDismissStarted` callback when the drag exceeds the dismissal threshold.
- Modified `MainActivity` to use `animateDpAsState` for the default top corner radius, accounting for the dismissal state.
- Updated `SheetVisualState` to prioritize `isNavBarHidden` checks and adjusted the collapsed corner radius from 60.dp to 32.dp for hidden navigation bars.
- Integrated the dismissal start signal in `UnifiedPlayerSheetV2`.
…State

Updates the logic for calculating navigation bar corner radii during swipe-to-dismiss transitions. The changes consolidate style-specific interpolation and remove redundant conditional checks.

- Removed manual `10.dp` interpolation for `NavBarStyle.DEFAULT` in the first calculation block, defaulting to `calculatedNormally`.
- Refactored the second calculation block to handle `NavBarStyle.DEFAULT` specifically within the swipe-dismiss state.
- Simplified the `else if` chain by removing redundant branches for default and full-width styles.
@theovilardo theovilardo merged commit 27e5ccc into master May 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant