Skip to content

fix: mini player swipe-dismiss no longer bounces down on a left/right swipe - #67

Merged
schmitzkr merged 1 commit into
mainfrom
worktree-miniplayer-swipe
Sep 8, 2026
Merged

schmitzkr merged 1 commit into
mainfrom
worktree-miniplayer-swipe

Conversation

@schmitzkr

Copy link
Copy Markdown
Owner

"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 moment confirmValueChange
stops playback, the surrounding AnimatedVisibility's visible flag
flips false on the same frame and plays 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.

(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

… 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
@schmitzkr
schmitzkr merged commit 338ed9c into main Sep 8, 2026
4 checks passed
@schmitzkr
schmitzkr deleted the worktree-miniplayer-swipe branch September 8, 2026 03:14
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