diff --git a/components/music/MiniPlayerBar.tsx b/components/music/MiniPlayerBar.tsx
index f7f533c2..14eba744 100644
--- a/components/music/MiniPlayerBar.tsx
+++ b/components/music/MiniPlayerBar.tsx
@@ -111,28 +111,28 @@ export const MiniPlayerBar: React.FC = () => {
// Swipe up - open modal (check position OR velocity)
if (currentPosition < -16 || velocity < -VELOCITY_THRESHOLD) {
+ // Slow return animation - won't jank with navigation
+ translateY.value = withTiming(0, {
+ duration: 600,
+ easing: Easing.out(Easing.cubic),
+ });
runOnJS(handlePress)();
+ return;
}
// Swipe down - stop playback and dismiss (check position OR velocity)
- else if (currentPosition > 16 || velocity > VELOCITY_THRESHOLD) {
+ if (currentPosition > 16 || velocity > VELOCITY_THRESHOLD) {
+ // No need to reset - component will unmount
runOnJS(handleDismiss)();
+ return;
}
- // Smooth return to original position (no bounce)
+ // Only animate back if no action was triggered
translateY.value = withTiming(0, {
duration: 200,
easing: Easing.out(Easing.cubic),
});
});
- // Tap gesture for opening modal (preserves existing behavior)
- const tapGesture = Gesture.Tap().onEnd(() => {
- runOnJS(handlePress)();
- });
-
- // Combine gestures - pan takes priority over tap
- const composedGesture = Gesture.Race(panGesture, tapGesture);
-
// Animated styles for the container
const animatedContainerStyle = useAnimatedStyle(() => ({
transform: [{ translateY: translateY.value }],
@@ -158,31 +158,38 @@ export const MiniPlayerBar: React.FC = () => {
const content = (
<>
- {/* Album art */}
-
- {imageUrl ? (
-
- ) : (
-
-
-
- )}
-
+ {/* Tappable area: Album art + Track info */}
+
+ {/* Album art */}
+
+ {imageUrl ? (
+
+ ) : (
+
+
+
+ )}
+
- {/* Track info */}
-
-
- {currentTrack.Name}
-
-
- {currentTrack.Artists?.join(", ") || currentTrack.AlbumArtist}
-
-
+ {/* Track info */}
+
+
+ {currentTrack.Name}
+
+
+ {currentTrack.Artists?.join(", ") || currentTrack.AlbumArtist}
+
+
+
{/* Controls */}
@@ -222,7 +229,7 @@ export const MiniPlayerBar: React.FC = () => {
);
return (
-
+