fix: mini player swipe-dismiss no longer bounces down on a left/right swipe - #67
Merged
Merged
Conversation
… swipe Swiping the mini-player pill correctly followed the finger left or right (SwipeToDismissBox's own doing), but the moment confirmValueChange stopped playback, the surrounding AnimatedVisibility's visible flag flipped false on the same frame and played its own exit transition on top -- slideOutVertically, unconditionally downward regardless of which way the swipe went. The two animations fought each other, and the vertical one always won visually. Added a dismissedBySwipe flag, set the moment a swipe actually confirms a dismissal, that swaps the outer AnimatedVisibility's exit to ExitTransition.None so SwipeToDismissBox's own already-in-progress directional animation isn't interrupted by a second, unrelated one. Reset on hasBook going true (a new pill appearing), not on bookId changing -- bookId also changes the moment stop() clears it, which would otherwise race the flag right when it's needed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M421Z8byhEsWKMq7eWWqDN
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.
"swiping away the miniplayer bounces it down even when the user swipes
left or right, its function is ok just looks odd"
Swiping the mini-player pill correctly follows the finger left or right
(
SwipeToDismissBox's own doing), but the momentconfirmValueChangestops playback, the surrounding
AnimatedVisibility'svisibleflagflips false on the same frame and plays its own exit transition on top —
slideOutVertically, unconditionally downward regardless of which waythe swipe went. The two animations fought each other, and the vertical
one always won visually.
Added a
dismissedBySwipeflag, set the moment a swipe actually confirmsa dismissal, that swaps the outer
AnimatedVisibility's exit toExitTransition.NonesoSwipeToDismissBox's own already-in-progressdirectional animation isn't interrupted by a second, unrelated one.
Reset on
hasBookgoing true (a new pill appearing), not onbookIdchanging —
bookIdalso changes the momentstop()clears it, whichwould otherwise race the flag right when it's needed.
(Separately investigated: "the update banner only appears after we use
the check for update button" turned out not to be a bug — the automatic
check is throttled to once per 6 hours and persists across reinstalls,
and today's repeated rebuild/reinstall cycle set that timestamp once
early on. No change needed there.)
🤖 Generated with Claude Code