From 5cc849c853047e211a2dd873f90511ce48c002a2 Mon Sep 17 00:00:00 2001 From: Fabian Schuh Date: Fri, 1 Dec 2023 16:33:49 +0100 Subject: [PATCH] feat: regularily try to fetch documents from api --- src/main.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.ts b/src/main.ts index 84615c8..51422cc 100644 --- a/src/main.ts +++ b/src/main.ts @@ -63,6 +63,11 @@ export default class RelayMdPLugin extends Plugin { } }); + // Additionally, we register a timer to fetch documents for us + this.registerInterval(window.setInterval(() => { + this.get_recent_documents(); + }, 5 * 60 * 1000)); // 5 minutes + this.addSettingTab(new RelayMDSettingTab(this.app, this)); }