import { Ionicons } from '@expo/vector-icons'; import { View, Text, FlatList } from 'react-native'; import { Artwork } from '~/components/Artwork'; import { ListItem } from '~/components/ListItem'; import { usePlayerStore } from '~/stores/playerStore'; import { formatDuration } from '~/services/audioService'; import { useTheme } from '~/utils/themeContext'; export default function QueueScreen() { const { colors } = useTheme(); const queue = usePlayerStore((s) => s.getQueue()); const currentSong = usePlayerStore((s) => s.currentSong); const playSong = usePlayerStore((s) => s.playSong); const currentIndex = queue.findIndex((s) => s.id === currentSong?.id); return ( {currentSong && ( AKTUELLER SONG {currentSong.title} {currentSong.artist || 'Unbekannt'} )} ALS NÄCHSTES `${item.id}-${index}`} contentContainerStyle={{ paddingBottom: 40 }} renderItem={({ item, index }) => ( } onPress={() => playSong(item, queue, currentIndex + 1 + index)} /> )} /> ); }