From 32178a34177e833969dbbf3fdeb98c120fc982ca Mon Sep 17 00:00:00 2001 From: Violet Caulfield Date: Mon, 27 Jan 2025 18:37:18 -0600 Subject: [PATCH] okay now actually do something make track look better when reordering --- components/Global/components/track.tsx | 1 + components/Player/screens/queue.tsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/Global/components/track.tsx b/components/Global/components/track.tsx index 7c35bd7c..0a239c02 100644 --- a/components/Global/components/track.tsx +++ b/components/Global/components/track.tsx @@ -157,6 +157,7 @@ export default function Track({ + ) } \ No newline at end of file diff --git a/components/Player/screens/queue.tsx b/components/Player/screens/queue.tsx index ae29f02e..7a0bc0e4 100644 --- a/components/Player/screens/queue.tsx +++ b/components/Player/screens/queue.tsx @@ -9,7 +9,7 @@ import DraggableFlatList from "react-native-draggable-flatlist"; export default function Queue({ navigation }: { navigation: NativeStackNavigationProp}): React.JSX.Element { const { width } = useSafeAreaFrame(); - const { queue, useClearQueue, useSkip, nowPlaying, } = usePlayerContext(); + const { queue, useClearQueue, useReorderQueue, useSkip, nowPlaying, } = usePlayerContext(); navigation.setOptions({ headerRight: () => { @@ -37,7 +37,7 @@ export default function Queue({ navigation }: { navigation: NativeStackNavigatio }} numColumns={1} onDragEnd={({ data, from, to}) => { - + useReorderQueue.mutate({ newOrder: data, from, to }); }} renderItem={({ item: queueItem, getIndex, drag, isActive }) => {