MCPcopy
hub / github.com/callumalpass/tasknotes / loadSettings

Method loadSettings

src/main.ts:697–721  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

695 }
696
697 async loadSettings() {
698 const loadedData = await this.loadSettingsData();
699 const { settings, shouldPersistMigratedSettings } = buildSettingsFromLoadedData(loadedData);
700 this.settings = settings;
701 this.shouldCreateStarterNoteOnStartup = !settings.lastSeenVersion;
702
703 if (shouldPersistMigratedSettings) {
704 // Save the migrated settings to include new field mappings (non-blocking)
705 window.setTimeout(() => {
706 void (async () => {
707 try {
708 await this.saveSettingsDataOnly();
709 } catch (error) {
710 tasknotesLogger.error("Failed to save migrated settings:", {
711 category: "configuration",
712 operation: "save-migrated-settings",
713 error: error,
714 });
715 }
716 })();
717 }, 100);
718 }
719
720 // Cache setting migration is no longer needed (native cache only)
721 }
722
723 async saveSettings() {
724 await this.settingsLifecycleService.saveSettings();

Callers 2

onloadMethod · 0.95

Calls 5

loadSettingsDataMethod · 0.95
saveSettingsDataOnlyMethod · 0.95
errorMethod · 0.80
setTimeoutMethod · 0.65

Tested by

no test coverage detected