Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
fix(desktop): clean up store listeners in createLicenseQuery
Richie McIlroybf11f6c5fd63
diff --git a/apps/desktop/src/utils/queries.ts b/apps/desktop/src/utils/queries.tsindex 38b803e28..f9185b877 100644--- a/apps/desktop/src/utils/queries.ts+++ b/apps/desktop/src/utils/queries.ts@@ -240,8 +240,15 @@ export function createLicenseQuery() {},}));- generalSettingsStore.listen(() => query.refetch());- authStore.listen(() => query.refetch());+ const generalSettingsCleanup = generalSettingsStore.listen(() =>+ query.refetch(),+ );+ const authCleanup = authStore.listen(() => query.refetch());++ onCleanup(() => {+ generalSettingsCleanup.then((cleanup) => cleanup());+ authCleanup.then((cleanup) => cleanup());+ });return query;}