From 04783e04557bd28de1bf45599813585a5391f5a4 Mon Sep 17 00:00:00 2001 From: James Hackett Date: Sat, 27 Jan 2024 03:52:21 +0000 Subject: [PATCH] Don't sync on startup if frequency is set to 0 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() {}