fix: newsletter sync

This commit is contained in:
Julian Krauser 2025-02-03 16:35:05 +01:00
parent 06d24c21a2
commit 859df5ff5c
2 changed files with 43 additions and 38 deletions

View file

@ -20,7 +20,10 @@ export const useNewsletterRecipientsStore = defineStore("newsletterRecipients",
},
getters: {
detectedChangeNewsletterRecipients: (state) =>
!isEqual(state.origin, state.recipients) && state.syncingNewsletterRecipients != "syncing",
!isEqual(
state.origin.sort((a: string, b: string) => a.localeCompare(b)),
state.recipients.sort((a: string, b: string) => a.localeCompare(b))
) && state.syncingNewsletterRecipients != "syncing",
},
actions: {
setNewsletterRecipientsSyncingState(state: "synced" | "syncing" | "detectedChanges" | "failed") {