From 2d80d428556dd1e3f3ed3c5d633b09ce73c2dba9 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Thu, 16 Jan 2025 00:58:00 +0000 Subject: [PATCH] optimize source changes --- src/screens/Feeds/VibeScreen.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/screens/Feeds/VibeScreen.tsx b/src/screens/Feeds/VibeScreen.tsx index 349ec7416d..b072ffe80a 100644 --- a/src/screens/Feeds/VibeScreen.tsx +++ b/src/screens/Feeds/VibeScreen.tsx @@ -207,6 +207,14 @@ function YoloFeed() { } nextPlayer.pause() + // use old array if no changes + if ( + oldSources[0] === currentSources[0] && + oldSources[1] === currentSources[1] && + oldSources[2] === currentSources[2] + ) { + return oldSources + } return currentSources }) })