Skip to content

TagSpaces is an offline, open source, document manager with tagging support

chore: extracting autosave interval in appconfig

Ilian Sapundshiev867df196a452
diff --git a/app/AppConfig.ts b/app/AppConfig.ts
index 5e897ae12..5fd540a5f 100644
--- a/app/AppConfig.ts
+++ b/app/AppConfig.ts
@@ -27,5 +27,6 @@ AppConfig.editableFiles = [
'sh',
'sql'
];
+AppConfig.autoSaveInterval = 40000;
export default AppConfig;
diff --git a/app/components/EntryContainer.tsx b/app/components/EntryContainer.tsx
index 4a55b0e8b..acb9e2875 100644
--- a/app/components/EntryContainer.tsx
+++ b/app/components/EntryContainer.tsx
@@ -352,7 +352,7 @@ function EntryContainer(props: Props) {
startSavingFile();
console.debug('autosave');
}
- }, 40000);
+ }, AppConfig.autoSaveInterval);
} else if (timer.current) {
clearInterval(timer.current);
}