Skip to content

Commit 8c1016d

Browse files
gantoineclaude
andcommitted
Fix v2 gallery not refetching when filter logic operator changes
The v2 gallery refetch watcher in GalleryShell only watched the filter selection arrays, not the per-filter logic operators (any/all/none). Toggling a filter to the inverse ("none") updated the store but did not trigger a refetch, so the results only changed when the selection itself was edited or after a reload (URL hydration re-runs the initial fetch). Watch all *Logic operators alongside their selections so inverting a filter (e.g. statuses -> "none") refetches immediately. Fixes #3798 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 0d487ad commit 8c1016d

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

frontend/src/v2/components/Gallery/GalleryShell.vue

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,17 @@ const {
173173
selectedMetadataProviders,
174174
selectedTags,
175175
selectedStatuses,
176+
genresLogic,
177+
franchisesLogic,
178+
collectionsLogic,
179+
companiesLogic,
180+
ageRatingsLogic,
181+
regionsLogic,
182+
languagesLogic,
183+
playerCountsLogic,
184+
metadataProvidersLogic,
185+
tagsLogic,
186+
statusesLogic,
176187
} = storeToRefs(galleryFilterStore);
177188
178189
// Drawer open state — bound to FilterDrawer via v-model.
@@ -242,6 +253,19 @@ watch(
242253
selectedMetadataProviders,
243254
selectedTags,
244255
selectedStatuses,
256+
// Logic operators (any/all/none) also change the result set, e.g.
257+
// switching statuses to "none" to invert the selection.
258+
genresLogic,
259+
franchisesLogic,
260+
collectionsLogic,
261+
companiesLogic,
262+
ageRatingsLogic,
263+
regionsLogic,
264+
languagesLogic,
265+
playerCountsLogic,
266+
metadataProvidersLogic,
267+
tagsLogic,
268+
statusesLogic,
245269
],
246270
() => {
247271
galleryRoms.invalidateWindows();

0 commit comments

Comments
 (0)