Fix/navbar dismiss corner behavior#2105
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.