mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-28 09:08:12 +08:00
Refactor the document upgrading code into a separate migrations file
This commit is contained in:
@@ -10,7 +10,6 @@ import {
|
||||
TriggerDownloadTextFile,
|
||||
TriggerImport,
|
||||
TriggerOpenDocument,
|
||||
TriggerUpgradeDocumentToVectorManipulationFormat,
|
||||
UpdateActiveDocument,
|
||||
UpdateOpenDocumentsList,
|
||||
UpdateSpreadsheetState,
|
||||
@@ -104,11 +103,6 @@ export function createPortfolioState(editor: Editor) {
|
||||
// Fail silently if there's an error rasterizing the SVG, such as a zero-sized image
|
||||
}
|
||||
});
|
||||
editor.subscriptions.subscribeJsMessage(TriggerUpgradeDocumentToVectorManipulationFormat, async (triggerUpgradeDocumentToVectorManipulationFormat) => {
|
||||
// TODO: Eventually remove this document upgrade code
|
||||
const { documentId, documentName, documentIsAutoSaved, documentIsSaved, documentSerializedContent } = triggerUpgradeDocumentToVectorManipulationFormat;
|
||||
editor.handle.triggerUpgradeDocumentToVectorManipulationFormat(documentId, documentName, documentIsAutoSaved, documentIsSaved, documentSerializedContent);
|
||||
});
|
||||
|
||||
editor.subscriptions.subscribeJsMessage(UpdateSpreadsheetState, async (updateSpreadsheetState) => {
|
||||
update((state) => {
|
||||
|
||||
Reference in New Issue
Block a user