mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-29 06:48:12 +08:00
Clean up autosave persistence (#3115)
* Set auto save state to false on document rename * Update open document list on transaction commit and aboard * Use current network to compute hash Was using the last element in undo Before artworks where not auto saved when the had no undo history * Refactor persistence
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { writable } from "svelte/store";
|
||||
|
||||
import { type Editor } from "@graphite/editor";
|
||||
import type { OpenDocument } from "@graphite/messages";
|
||||
import {
|
||||
type FrontendDocumentDetails,
|
||||
TriggerFetchAndOpenDocument,
|
||||
TriggerSaveDocument,
|
||||
TriggerExportImage,
|
||||
@@ -21,7 +21,7 @@ import { extractPixelData, rasterizeSVG } from "@graphite/utility-functions/rast
|
||||
export function createPortfolioState(editor: Editor) {
|
||||
const { subscribe, update } = writable({
|
||||
unsaved: false,
|
||||
documents: [] as FrontendDocumentDetails[],
|
||||
documents: [] as OpenDocument[],
|
||||
activeDocumentIndex: 0,
|
||||
dataPanelOpen: false,
|
||||
propertiesPanelOpen: true,
|
||||
|
||||
Reference in New Issue
Block a user