diff --git a/apps/web/src/pages/home/feed/Feed.tsx b/apps/web/src/pages/home/feed/Feed.tsx index e985ef5f..63255456 100644 --- a/apps/web/src/pages/home/feed/Feed.tsx +++ b/apps/web/src/pages/home/feed/Feed.tsx @@ -74,7 +74,9 @@ function Feed() { } const message = JSON.parse(event.data); - queryClient.setQueryData(["now-playings"], () => message.nowPlayings); + queryClient.setQueryData(["now-playings"], () => [ + ...message.nowPlayings, + ]); queryClient.setQueryData( ["scrobblesChart"], () => message.scrobblesChart, @@ -83,8 +85,8 @@ function Feed() { await queryClient.invalidateQueries({ queryKey: ["infiniteFeed", feedUri], }); - await queryClient.invalidateQueries({ queryKey: ["now-playings"] }); - await queryClient.invalidateQueries({ queryKey: ["scrobblesChart"] }); + // await queryClient.invalidateQueries({ queryKey: ["now-playings"] }); + // await queryClient.invalidateQueries({ queryKey: ["scrobblesChart"] }); }; return () => { diff --git a/apps/ws/src/main.ts b/apps/ws/src/main.ts index 2dcc022d..2189f278 100644 --- a/apps/ws/src/main.ts +++ b/apps/ws/src/main.ts @@ -80,7 +80,7 @@ client.on("message", async (data) => { if (channels.has(collection) && socket.readyState === WebSocket.OPEN) { socket.send( JSON.stringify({ - nowPlayings, + ...nowPlayings, scrobbles, scrobblesChart, actorScrobbles,