Skip to content

Commit

Permalink
Don't sync on startup if frequency is set to 0 (#186)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
DistroByte authored and sywhb committed Feb 7, 2024
1 parent 8fa39f0 commit a09f10c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
Expand Down

0 comments on commit a09f10c

Please sign in to comment.