A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
feat: auto sync on sse connect
thecodrr756efd3af18a
diff --git a/packages/core/api/index.js b/packages/core/api/index.jsindex 2f6242f6f..6b06d5d31 100644--- a/packages/core/api/index.js+++ b/packages/core/api/index.js@@ -161,6 +161,7 @@ class Database {this.evtSource.onopen = async () => {console.log("SSE: opened channel successfully!");+ EV.publish(EVENTS.databaseSyncRequested, true, false);};this.evtSource.onerror = function (error) {diff --git a/packages/core/api/sync/index.js b/packages/core/api/sync/index.jsindex 6a3e851c5..1048a4185 100644--- a/packages/core/api/sync/index.js+++ b/packages/core/api/sync/index.js@@ -162,7 +162,7 @@ export default class Sync {_scheduleSync() {this.stopAutoSync();this._autoSyncTimeout = setTimeout(() => {- EV.publish(EVENTS.databaseSyncRequested);+ EV.publish(EVENTS.databaseSyncRequested, false, false);}, this._autoSyncInterval);}