From 2e9db3e0bdb51c68800bfdc3831fcbacc74f7d88 Mon Sep 17 00:00:00 2001 From: James Hackett Date: Wed, 7 Feb 2024 03:43:39 +0000 Subject: [PATCH] Don't sync on startup if frequency is set to 0 (#186) This change has been requested in #174. This change was introduced with no option to toggle it off. This is a hacky workaround until a better solution comes along --- src/main.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 236974a..6b56950 100644 --- a/src/main.ts +++ b/src/main.ts @@ -103,8 +103,10 @@ export default class OmnivorePlugin extends Plugin { this.scheduleSync() - // sync when the app is loaded - await this.fetchOmnivore() + // sync when the app is loaded if frequency is greater than zero + if (this.settings.frequency > 0) { + await this.fetchOmnivore() + } } onunload() {}