Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

core: add api for checking unsynced changes

Abdullah Atta8a44a7b99a03
diff --git a/packages/core/src/api/index.ts b/packages/core/src/api/index.ts
index 118bf82b1..c029c6232 100644
--- a/packages/core/src/api/index.ts
+++ b/packages/core/src/api/index.ts
@@ -422,6 +422,10 @@ class Database {
return this.syncer.start(options);
}
+ hasUnsyncedChanges() {
+ return this.syncer.sync.collector.hasUnsyncedChanges();
+ }
+
host(hosts: typeof Hosts) {
if (process.env.NODE_ENV !== "production") {
Hosts.AUTH_HOST = hosts.AUTH_HOST || Hosts.AUTH_HOST;