From 807ae86bcfffe231cefd40ebc3bcad63b1674d8f Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Tue, 14 Jul 2026 09:41:19 -0400 Subject: [PATCH] fix: skip live gallery inserts for filtered views Generated-By: PostHog Code Task-Id: b131c873-6e03-47dd-bf51-c99f01ef1f5f --- frontend/src/v2/composables/useScanLifecycle/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/v2/composables/useScanLifecycle/index.ts b/frontend/src/v2/composables/useScanLifecycle/index.ts index addf713c2..3b740729e 100644 --- a/frontend/src/v2/composables/useScanLifecycle/index.ts +++ b/frontend/src/v2/composables/useScanLifecycle/index.ts @@ -26,6 +26,7 @@ import type { Emitter } from "mitt"; import { inject } from "vue"; import type { ScanStats } from "@/__generated__"; import platformApi from "@/services/api/platform"; +import storeGalleryFilter from "@/stores/galleryFilter"; import storePlatforms from "@/stores/platforms"; import storeRoms, { type SimpleRom } from "@/stores/roms"; import storeScanning, { type ScanningPlatform } from "@/stores/scanning"; @@ -37,6 +38,7 @@ export function installScanLifecycle() { const scanningStore = storeScanning(); const romsStore = storeRoms(); const platformsStore = storePlatforms(); + const galleryFilterStore = storeGalleryFilter(); const galleryRomsStore = storeGalleryRoms(); const emitter = inject>("emitter"); @@ -100,7 +102,11 @@ export function installScanLifecycle() { // If the user is currently looking at the gallery of the platform // being scanned, fold the new ROM into the visible list. - if (galleryRomsStore.currentPlatform?.id === rom.platform_id) { + if ( + galleryRomsStore.currentPlatform?.id === rom.platform_id && + !galleryFilterStore.searchTerm && + !galleryFilterStore.isFiltered() + ) { galleryRomsStore.addLiveRom(rom); } if (romsStore.currentPlatform?.id === rom.platform_id) {