diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 62305fa..2ac6b83 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -14,17 +14,22 @@ EventsOn, WindowSetTitle, } from "../wailsjs/runtime/runtime"; - import { ResetTimeline } from "../wailsjs/go/main/App"; + import { ResetTimeline, SaveTimeline } from "../wailsjs/go/main/App"; import { onDestroy } from "svelte"; const { route, setRoute } = router; const { isProcessingVid } = exportOptionsStore; const { resetVideo } = videoStore; const { resetVideoFiles } = videoFiles; - function cleanupProjectWorkspace() { + async function cleanupProjectWorkspace() { resetVideoFiles(); resetVideo(); - ResetTimeline(); + try { + await SaveTimeline(); + await ResetTimeline(); + } catch (err) { + console.log(err); + } WindowSetTitle("Gahara"); } @@ -36,6 +41,7 @@ cleanupProjectWorkspace(); break; case "export": + SaveTimeline().catch(console.log); WindowSetTitle(`Export - ${$projectName}`); } setRoute(to); diff --git a/frontend/src/VideoLayout.svelte b/frontend/src/VideoLayout.svelte index 062e13d..9a6a57c 100644 --- a/frontend/src/VideoLayout.svelte +++ b/frontend/src/VideoLayout.svelte @@ -6,7 +6,6 @@ LoadProjectFiles, SaveTimeline, SaveProjectFiles, - ResetTimeline, DeleteRIDReferences, DeleteProjectFile, EnableVideoMenus, @@ -164,10 +163,6 @@