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

Method needsMigration

src/services/ViewStateManager.ts:441–449  ·  view source on GitHub ↗

* Detect if migration is needed (saved views exist in localStorage but not in plugin data)

()

Source from the content-addressed store, hash-verified

439 * Detect if migration is needed (saved views exist in localStorage but not in plugin data)
440 */
441 needsMigration(): boolean {
442 const localStorageData = this.app.loadLocalStorage(this.savedViewsStorageKey);
443 const hasLocalStorageData = !!localStorageData;
444 const hasPluginData =
445 this.plugin.settings.savedViews && this.plugin.settings.savedViews.length > 0;
446
447 // Migration is needed if there's localStorage data but no plugin data
448 return hasLocalStorageData && !hasPluginData;
449 }
450
451 /**
452 * Perform one-time migration from legacy filter system

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected