A decentralized music tracking and discovery platform built on AT Protocol 🎵
listenbrainz spotify atproto lastfm musicbrainz scrobbling

Disable structural sharing and simplify query updates

Turn off React Query's structural sharing for now-playings so new arrays
are treated as changes. Also pass values directly to setQueryData for
now-playings and scrobblesChart instead of updater functions.

Changed files
+3 -7
apps
web
src
hooks
pages
home
feed
+1
apps/web/src/hooks/useNowPlaying.tsx
··· 25 25 { params: { size: 47 } }, 26 26 ), 27 27 select: (res) => res.data.nowPlayings || [], 28 + structuralSharing: false, 28 29 });
+2 -7
apps/web/src/pages/home/feed/Feed.tsx
··· 74 74 } 75 75 76 76 const message = JSON.parse(event.data); 77 - queryClient.setQueryData(["now-playings"], () => [ 78 - ...message.nowPlayings, 79 - ]); 80 - queryClient.setQueryData( 81 - ["scrobblesChart"], 82 - () => message.scrobblesChart, 83 - ); 77 + queryClient.setQueryData(["now-playings"], [...message.nowPlayings]); 78 + queryClient.setQueryData(["scrobblesChart"], message.scrobblesChart); 84 79 85 80 await queryClient.invalidateQueries({ 86 81 queryKey: ["infiniteFeed", feedUri],