diff --git a/frontend/src/components/Playlists.tsx b/frontend/src/components/Playlists.tsx index 14c84d5..910d9d8 100644 --- a/frontend/src/components/Playlists.tsx +++ b/frontend/src/components/Playlists.tsx @@ -205,9 +205,13 @@ export default function Playlists({ canWrite }: { canWrite: boolean }) { const order = useUndoable([], { onApply: (next) => { if (selectedId == null) return; - api - .reorderPlaylist(selectedId, next.map((v) => v.id)) - .then(() => qc.invalidateQueries({ queryKey: ["playlists"] })); + api.reorderPlaylist(selectedId, next.map((v) => v.id)).then(() => { + // Refresh the sidebar (cover may change) and the detail (so the now-dirty state, + // and the Reset/Unsynced indicators, show without an F5). The membership guard + // keeps the refetch from wiping the undo history on a pure reorder. + qc.invalidateQueries({ queryKey: ["playlists"] }); + qc.invalidateQueries({ queryKey: ["playlist", selectedId] }); + }); }, }); const items = order.value;