Compare commits

...
3 changed files with 13 additions and 3 deletions

No files matched your search

@@ -59,7 +59,8 @@ export function MenuView({
outlineVariant: "#545458",
error: "#FF453A",
}}
matchContents
// Rows fill their parent width; compact action buttons keep intrinsic sizing.
matchContents={shouldOpenOnLongPress ? { vertical: true } : true}
>
<DropdownMenu
expanded={expanded}
@@ -70,7 +71,9 @@ export function MenuView({
properties={{ clippingEnabled: false }}
>
<DropdownMenu.Trigger>
<RNHostView matchContents>
<RNHostView
matchContents={shouldOpenOnLongPress ? { vertical: true } : true}
>
{shouldOpenOnLongPress ? (
<GestureDetector gesture={longPress}>
<View collapsable={false}>{children}</View>
+1
View File
@@ -859,6 +859,7 @@ export function PlaybackProvider({ children }: { children: ReactNode }) {
recorded.origin ??
(recorded.playlistId ? `playlist:${recorded.playlistId}` : undefined)
resetQueuePlayback()
store.update(playbackQueue.clearQueue)
store.update(recipe)
const firstSongId = store.getState().queue[0]
if (!firstSongId) return
+7 -1
View File
@@ -388,6 +388,7 @@ export function PlaybackProvider({ children }: { children: ReactNode }) {
const [queueOpen, setQueueOpen] = useState(false)
const [isPlaying, setIsPlaying] = useState(false)
const [playbackStartVersion, setPlaybackStartVersion] = useState(0)
const [currentTime, setCurrentTime] = useState(0)
const [measuredDuration, setMeasuredDuration] = useState<{
songId: string
@@ -890,7 +891,7 @@ export function PlaybackProvider({ children }: { children: ReactNode }) {
return () => {
audio.removeEventListener("canplay", onCanPlay)
}
}, [isPlaying, currentSongId, attemptPlayback])
}, [isPlaying, currentSongId, playbackStartVersion, attemptPlayback])
useEffect(() => {
const audio = audioRef.current
@@ -1069,6 +1070,7 @@ export function PlaybackProvider({ children }: { children: ReactNode }) {
recorded.origin ??
(recorded.playlistId ? `playlist:${recorded.playlistId}` : undefined)
const previousSongId = store.getState().queue[0]
store.update(playbackQueue.clearQueue)
store.update(recipe)
const firstSongId = store.getState().queue[0]
if (!firstSongId) {
@@ -1078,7 +1080,11 @@ export function PlaybackProvider({ children }: { children: ReactNode }) {
if (firstSongId === previousSongId) {
seekTo(0)
}
// Repeated Play/Shuffle presses must request playback even when the
// first song and playing state have not changed.
isPlayingRef.current = true
setIsPlaying(true)
setPlaybackStartVersion((version) => version + 1)
recordPlay(
recorded.playlistId
? { playlistId: recorded.playlistId }