MCPcopy Create free account
hub / github.com/GraphiteEditor/Graphite / readPersistedState

Function readPersistedState

frontend/src/utility-functions/persistence.ts:80–87  ·  view source on GitHub ↗
(editor: EditorWrapper)

Source from the content-addressed store, hash-verified

78}
79
80export async function readPersistedState(editor: EditorWrapper) {
81 await migrateToNewFormat();
82 await garbageCollectDocuments();
83
84 const state = await databaseGet<PersistedState>("state");
85 if (!state) return;
86 editor.loadPersistedState(state);
87}
88
89export async function saveEditorPreferences(preferences: unknown) {
90 await databaseSet("preferences", preferences);

Callers 1

createPersistenceManagerFunction · 0.90

Calls 2

migrateToNewFormatFunction · 0.85
garbageCollectDocumentsFunction · 0.85

Tested by

no test coverage detected