Compare commits
1
Commits
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { Ionicons } from "@expo/vector-icons"
|
||||
import { SongSwipeRow } from "@/components/song-swipe-row"
|
||||
import {
|
||||
useSwipeRowGroup,
|
||||
@@ -231,11 +232,10 @@ export default function AlbumScreen() {
|
||||
}
|
||||
>
|
||||
<Pressable hitSlop={8}>
|
||||
<PaletteIcon
|
||||
tone="foreground"
|
||||
<Ionicons
|
||||
name="ellipsis-horizontal"
|
||||
size={22}
|
||||
color={palette.isDark ? "#fff" : "#000"}
|
||||
color={colors.foreground}
|
||||
/>
|
||||
</Pressable>
|
||||
</MediaActionMenu>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { Ionicons } from "@expo/vector-icons"
|
||||
import {
|
||||
CollectionHero,
|
||||
useCollectionHeroLayout,
|
||||
@@ -179,6 +180,7 @@ function PlaylistContent({
|
||||
}) {
|
||||
const router = useRouter()
|
||||
const isFocused = useIsFocused()
|
||||
const colors = useThemeColors()
|
||||
const { playPlaylist, playPlaylistShuffled, playFromSong } =
|
||||
usePlaybackActions()
|
||||
const { isSongFavorite } = useFavorites()
|
||||
@@ -299,11 +301,10 @@ function PlaylistContent({
|
||||
onAction={handlePlaylistMenuAction}
|
||||
>
|
||||
<Pressable hitSlop={8}>
|
||||
<PaletteIcon
|
||||
tone="foreground"
|
||||
<Ionicons
|
||||
name="ellipsis-horizontal"
|
||||
size={22}
|
||||
color={palette.isDark ? "#fff" : "#000"}
|
||||
color={colors.foreground}
|
||||
/>
|
||||
</Pressable>
|
||||
</MediaActionMenu>
|
||||
@@ -311,6 +312,7 @@ function PlaylistContent({
|
||||
}
|
||||
}, [
|
||||
canEdit,
|
||||
colors.foreground,
|
||||
deletePlaylist,
|
||||
handlePlaylistDetailAction,
|
||||
palette.foreground,
|
||||
|
||||
@@ -376,8 +376,7 @@ export function PlaybackProvider({ children }: { children: ReactNode }) {
|
||||
|
||||
const handlePlaylistStatusUpdate = useCallback(
|
||||
(status: AudioPlaylistStatus) => {
|
||||
// iOS may remove the finished item before delivering its final status.
|
||||
if (!status.isLoaded && !status.didJustFinish) return
|
||||
if (!status.isLoaded) return
|
||||
const state = storeRef.current.getState()
|
||||
if (loadedSongIdsRef.current[status.currentIndex] !== state.queue[0]) {
|
||||
return
|
||||
@@ -428,14 +427,7 @@ export function PlaybackProvider({ children }: { children: ReactNode }) {
|
||||
isPlayingRef.current = false
|
||||
setIsPlayingState(false)
|
||||
storeRef.current.update(playbackQueue.skipNext)
|
||||
const playlist = playlistRef.current
|
||||
if (playlist) {
|
||||
playlist.pause()
|
||||
// Reload the final item, which iOS removes when playback ends.
|
||||
ignoreTrackChangeRef.current = true
|
||||
playlist.skipTo(status.currentIndex)
|
||||
scheduleTrackChangeHandling()
|
||||
}
|
||||
void playlistRef.current?.seekTo(0)
|
||||
currentTimeRef.current = 0
|
||||
setCurrentTime(0)
|
||||
return
|
||||
@@ -451,7 +443,7 @@ export function PlaybackProvider({ children }: { children: ReactNode }) {
|
||||
playlist?.play()
|
||||
}
|
||||
},
|
||||
[scheduleTrackChangeHandling]
|
||||
[]
|
||||
)
|
||||
|
||||
const handleTrackChanged = useCallback(
|
||||
|
||||
@@ -955,7 +955,6 @@ export function PlaybackProvider({ children }: { children: ReactNode }) {
|
||||
if (!shouldContinuePlaying) {
|
||||
autoPlayNextRef.current = false
|
||||
isPlayingRef.current = false
|
||||
audio.pause()
|
||||
audio.currentTime = 0
|
||||
currentTimeRef.current = 0
|
||||
setCurrentTime(0)
|
||||
|
||||
Reference in new issue
Block a user