Merge pull request #1089 from Hexastack/fix/inbox-search-filter-new-subscribers

feat(inbox): Only update subscriber cache when no filters are active
This commit is contained in:
Med Marrouchi 2025-06-04 10:23:50 +01:00 committed by GitHub
commit 9cde4f85bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,8 +73,9 @@ export const useInfiniteLiveSubscribers = (props: {
if (event.op === "newSubscriber") {
const { result } = normalizeAndCache(event.profile);
// Only update the unfiltered (all-subscribers) cache
queryClient.setQueryData(
[QueryType.infinite, EntityType.SUBSCRIBER, params],
[QueryType.infinite, EntityType.SUBSCRIBER, { where: {} }],
(oldData) => {
if (oldData) {
const data = oldData as InfiniteData<string[]>;