Open-source and local-first Slack and Notion alternative that puts you in control of your data
TypeScript chatchat-applicationcrdteditorelectronknowledge-baselocal-firstnotionnotion-alternativerealtime-collaborationself-hostedslacksqliteteam-collaborationwikiyjs
Clear subscriptions on window closed
Hakan Shehu7336d778b033
diff --git a/apps/desktop/src/main.ts b/apps/desktop/src/main.tsindex e7074db1..40c8f678 100644--- a/apps/desktop/src/main.ts+++ b/apps/desktop/src/main.ts@@ -99,6 +99,8 @@ app.on('window-all-closed', () => {app.quit();}++ queryService.clearSubscriptions();});app.on('activate', () => {diff --git a/apps/desktop/src/main/services/query-service.ts b/apps/desktop/src/main/services/query-service.tsindex d329e9a1..015b6896 100644--- a/apps/desktop/src/main/services/query-service.ts+++ b/apps/desktop/src/main/services/query-service.ts@@ -70,6 +70,10 @@ class QueryService {this.subscribedQueries.delete(id);}+ public clearSubscriptions() {+ this.subscribedQueries.clear();+ }+private async processEventsQueue() {if (this.isProcessingEvents) {return;